The visitors took the lead through Alexandre Pato before Empoli captain Antonio Busce pulled the hosts level.

Claudio Marchisio hit the post for the Azzurri before the Rossoneri broke the hosts' resistance with goals by Massimo Ambrosini and Kaka in the last five minutes.

The hosts put their opponents under pressure in the first half with the majority of chances and possession.

The Azzurri saw a fifth-minute claim for a penalty waved away after Sebastian Giovinco, who had been played in by Ignazio Abate, was muscled off the ball by Ambrosini.

The hosts came close to taking the lead two minutes later when Abate shot from the edge of the area after he picked up a Paolo Maldini clearance, but Milan goalkeeper Zeljko Kalac gathered with ease.

Milan took the lead after 19 minutes when Empoli goalkeeper Davide Bassi dropped a Massimo Oddo cross under pressure from Ambrosini and Pato reacted fastest to slot the ball into the open goal.

The hosts drew level less than five minutes later as Luca Antonini's low cross found its way through to Busce at the far post who fired home from 12 yards.

Empoli coach Alberto Malesani was then sent to the stands by the referee for his reaction to the goal as emotions ran high on the sidelines.

Alberto Gilardino had a goal ruled out for offside after 26 minutes, the former Parma striker latching on to a nice lob from Yoann Gourcuff but straying beyond the last man in the process.

Gilardino came close again after a similar move moments later but on this occasion Bassi saved his lobbed effort.

The Azzurri had a trio of good chances to take a lead just before the break.

Francesco Pratali fired just over the bar from a Giovinco corner before Luca Saudati turned and shot just wide, while a minute later Abate did well to turn and run at goal before firing over the bar.

Milan coach Carlo Ancelotti brought on Christian Brocchi and Daniele Bonera at the break in place of Gourcuff and Oddo as he looked to change the balance of play.

However, it was Empoli that looked the more dangerous after the break with Marchisio, who put in another excellent performance, hitting the Milan post with a cracking shot from range that had Kalac beaten.

Empoli substitute Francesco Marianini shot wide from outside the area after 72 minutes following some good build up play by the hosts.

At the other end, Pato fired just over the bar having cut in from the right as Milan finally began to exert some pressure.

And the battling hosts were unjustly put to the sword in the dying stages as Kaka took centre stage.

First, the Brazilian's cross from the left found its way to Ambrosini who headed home at the far post.

And Kaka put the game to bed in the last minute, scoring with a well-placed effort after good work by substitute Alberto Paloschi.