Two goals in the final five minutes of the match from Mario Balotelli and Philippe Mexes saw AC Milan come from a goal behind to beat Siena 2-1 and thus secure themselves a place in the UEFA Champions League next season.
Siena took a shock lead when Claudio Terzi headed home from a free-kick as Milan struggled to find their natural rhythm or create any meaningful chances.
But just as it looked like the game was going to run away from Milan two second half red cards, Milan’s Massimo Ambrosini and Siena’s Christian Terlizzi receiving their marching orders, opened up the game.
And an 85th minute penalty from Balotelli and an 88th minute winner from Mexes saw Fiorentina’s efforts in their Serie A match against Pescara at the same time prove futile.
The result left AC Milan in third place, two points clear of fourth placed Fiorentina while Perscara suffered their 28th loss of the season highlighting their ranking at the bottom of the table.
Fiorentina put five goals past relegated Pescara, winning 5-1, thanks to a hat-trick from Adem Ljajic and goals from Steven Jovetic and Matias Fernandez.
Fiorentina will now compete in the Europa League thanks to their fourth place finish, a competition Lazio must pursue through the Coppa Italia final after a 1-0 defeat at Cagliari condemned the capital club to seventh place in Serie A.
Daniele Dessena claimed all three points for Cagliari with a late header that leaves them in 11th place on the table.
Lazio needed both a victory and fifth-placed Udinese to slip up at Inter Milan, but the Inter did not oblige losing 5-2.
Udinese, though, made no mistake in tying down the final automatic Europa League place (fifth place) by condemning Inter Milan to one last defeat at the end of a miserable Serie A season at San Siro.
There was no prospect of continental competition for the Azzurri, who limped over the line to finish ninth as goals from Giampiero Pinzi, Maurizio Domizzi, Antonio Di Natale, Gabriel Silva and Luis Muriel saw Udinese run out 5-2 winners over Inter.
Roma finished in sixth place after a 2-1 win over second placed Napoli and will now face Lazio in the Coppa Italia final with triumph promising the reward of a trophy and the chance to compete in the Europa League next season.
Palermo suffered a 3-1 home defeat to Parma (finished in tenth) in their final outing in Italy's top flight ahead of their relegation to Serie B.
Massimo Gobbi, Jaime Valdes and Ishak Belfodil piled the misery on the Sicilians at the end of a season to forget, and Fabrizio Miccoli netted a consolation in what was probably his last appearance for the Rosaneri.
The early afternoon games saw a late goal from Cyril Thereau deny Atalanta (finished in 15th) a winning end to the Serie A season as Chievo (finished in 12th) took home a point from a 2-2 draw at the Stadio Atleti Azzurri d'Italia.
Elsewhere, Bologna and Genoa ended the Serie A season with a point apiece but failed to score any goals at the Stadio Renato Dall'Ara.
Genoa finished the league in 17th place while Bologna finished in 13th.