Milan played out an exciting Gamper Trophy game against Barcelona in what was their last test before facing Lecce on Sunday on the opening day of the season.
It was a special evening for Ronaldinho, who was greeted by a standing ovation before kick-off. Allegri played the Brazilian upfront with Borriello and Huntelaar while Boateng was given his debut in midfield alongside Pirlo and Ambrosini. Alessandro Nesta returned in defence after his hand surgery.
Guardiola fielded a trident with Iniesta, Villa and Ibrahimovic.
The home side started well and Ibrahimovic had a goal disallowed for offside while just before the half-hour mark Iniesta saw a shot well saved by Amelia and at the other end Ambrosini volleyed wide.
Allegri made a raft of changes at half-time but it was Barca who took the lead two minutes after the restart, when David Silva toe-poked the ball beyond Amelia after reaching Adriano’s cross from the left.
Andres Iniesta and Bojan’s header then went close but the Rossoneri got their just reward as Pippo Inzaghi hit a stunning left-footed volley into the top corner on 67 minutes.
Leo Messi tested substitute goalkeeper Flavio Roma with a header and a curling free-kick but Milan were the equal of any further pressure and game finished 1-1 which lead to penalties to decide the outcome.
The first from the spot was Leo Messi who put Roma the wrong way. However, Clarence Seedorf saw his shot saved. Same fate for Busquets, well blocked by the excellent Roma. The second penalty taker for Milan, Pirlo, missed. Bojan scored, despite the Milan goalkeeper guessing right. Yepes got the Rossoneri off the mark. Barca's Thiag scored but Jankulovski: missed and Barcelona won 4-2.
MILAN - Barcellona-Milan 4-2, penalties. Statistics:
Barcellona: Pinto, Adriano, Milito (18'sh Fontas), Puyol (18'sh Pique), Abidal (1'sh Dani Alves); Maxwell (1'sh Thiago), Jeffren (18'sh Pedro), Jonathan (18'sh Busquets); Iniesta (18'sh Keita), Ibrahimovic (1'sh Bojan), Villa (18'sh Messi).
Coach: Guardiola.
Milan: Amelia (15'sh Roma); Bonera (1'sh Abate), Nesta (1'sh Papastathopoulos), Thiago Silva (15'sh Yepes), Antonini (1'sh Jankulovski); Ambrosini (1'sh Seedorf), Pirlo, Boateng (37'sh Strasser); Huntelaar (10'sh Oduamadi), Borriello (10'sh Inzaghi), Ronaldinho (31'sh Merkel).
Coach: Allegri.
Goalscorers: 47' Villa (B), 67' Inzaghi (M)
Referee: Borbalan (Spa)
Penalties:
Messi goal; Busquets saved; Bojan goal; Thiago goal;
Seedorf saved; Pirlo saved; Yepes goal; Jankulovski saved.