The Rossoneri had to score twice, including a hotly-disputed penalty, in the closing 10 minutes to secure maximum points and a top-three finish.
After surviving intense early pressure, the home side grabbed an unexpected lead when Claudio Terzi was left unmarked to convert a free kick delivered by the highly-impressive Alessandro Rosina. Milan rather lost its discipline and saw captain Massimo Ambrosini dismissed as the club struggled to fashion chances, but Christian Terlizzi’s red card left the door open and late strikes from Mario Balotelli and Philippe Mexes gave the visiting side three scantly-deserved points.
Already consigned to Serie B next season, little was expected of the home side, yet when Rosina was allowed time after a quick free kick to pick out a dangerous cross, Terzi was able to head into the net with relative ease.
Milan really toiled thereafter but Balotelli breathed life into the game with eight minutes left as he converted from a penalty after being softly awarded the kick following a tussle with Felipe.
With three minutes left, Mexes scrambled a vital goal after steering the ball into the net at the second attempt following a free kick.
In the early stages the star of the show had been home goalkeeper Gianluca Pegolo, who was called into serious action several times in the opening 10 minutes. Balotelli started in a particularly explosive manner and was unfortunate to see a fierce drive turned over by the goalkeeper. Before the break, the Italy striker would also see a free kick pushed wide by Pegolo.
In the opening quarter of an hour, Milan’s front three were electric but would ultimately pay for Mbaye Niang’s lack of composure in front of goal. The young Frenchman headed a decent chance wide and then failed to make contact when Robinho’s low cross invited the opening goal. Shortly afterward the Brazilian had an effort of his own, yet Pegolo athletically parried clear.
Shortly after conceding to Terzi, Balotelli had a golden chance to level the match but headed against the underside of the bar from an Ignazio Abate cross.
This proved a pivotal moment in the game as Milan would quickly lose their way and would be increasingly stifled by the well-organized home side.
Only after Stephan El Shaarawy was introduced after an hour did Milan even begin to offer a renewed threat, but the recovery seemed to have ended when Ambrosini was dismissed for a second booking. Terlizzi was stupidly sent off shortly afterwards, though, giving Milan a lifeline.
The mercurial Balotelli was having an erratic game but reminded the home side of his threat from a free kick saved by Pegoto before finally beating the goalkeeper after being awarded a dubious spot kick.
Now the momentum was firmly with Milan and Mexes struck decisively with three minutes remaining to send the club into the Champions League at the expense of Fiorentina in the most remarkable circumstances.