Kaka 55 (M), Pato 76 (M)
There was joy all round, as Milan reached the Champions League, waved goodbye to Paolo Maldini and Fiorentina fans still celebrated an impressive fourth place.
So much was at stake in this final round, as a win with two clear goals would send the Viola into the Champions League directly, pushing the Rossoneri into the preliminary round. It was also Paolo Maldini's final match and the Stadio Franchi crowd prepared a tribute to him before kick-off.
Alessandro Nesta returned to the squad for only the second time this season, but was not fit to play. Massimo Ambrosini sat out a ban with the sidelined Christian Abbiati, Marco Borriello, Kakha Kaladze and Daniele Bonera. Fiorentina had Felipe Melo and Dario Dainelli suspended, plus Adrian Mutu, Mario Alberto Santana, Sergio Almiron and Emiliano Bonazzoli injured.
Milan were undefeated in Florence since November 20 2005, but came face to face with their former flop Alberto Gilardino. It was Gila who had the first chance with a scuffed left-foot finish, but Marek Jankulovski's snapshot took a double deflection to skim the upright.
Franco Semioli nodded a Manuel Pasqual cross off target and Gilardino's header also skimmed the target, but on 24 minutes Mathieu Flamini's screamer thumped the top of the crossbar.
Sebastien Frey got down to parry a Gianluca Zambrotta snapshot. There was controversy on 41 minutes when Gilardino fell under pressure from Giuseppe Favalli, but the referee had a very clear view and waved away penalty appeals.
Jankulovski fired another promising shot over the bar, but Zambrotta needed some desperate defending after Nelson Dida hesitated in coming off his line.
There was a scare on 47 minutes when a Frey goal kick was knocked down for Gilardino, whose shot with the outside of his right foot shaved a coat of paint off the far post.
Milan broke the deadlock with a potentially decisive goal this season. Alessandro Gamberini did very well to stop Pippo Inzaghi connecting with the cross from six yards, but the clearance turned into an assist for Kaka right behind them.
Now Fiorentina needed to score three goals to reach third place. A chaotic move nearly made it 2-0, as Inzaghi tried to set up David Beckham, then dribbled between three Viola jerseys to drill over under pressure from Gamberini.
Pato scored the only goal when these two teams last met and he was on target again. The Duck sprung the offside trap on Kaka's through ball and waltzed round defenders to chip Frey.
In stoppages the Stadio Franchi gave a standing ovation to Maldini as he left the pitch for the last time and was buried in embraces from his teammates. Alessandro Nesta also made his debut this season after back problems.
Fiorentina: Frey; Comotto, Gamberini, Zauri, Pasqual (Kuzmanovic 70); Donadel, Montolivo; Semioli, Jovetic (Jorgensen 64), Vargas (Gobbi 64); Gilardino
Milan: Dida; Zambrotta, Maldini, Favalli (Nesta 77), Jankulovski; Beckham (Gattuso 81), Pirlo Flamini, Seedorf; Kaka, Inzaghi