Giacomo Bonaventura bagged a brace against his former club Atalanta as AC Milan won 3-1 at the Atleti Azzurri d'Italia.
In what could be Filippo Inzaghi's last game in charge of Milan it was the hosts who opened the scoring through Daniele Baselli after 21 minutes.
But Giampolo Pazzini and Bonaventura struck back before half-time, with Atalanta academy product Bonaventura adding his second of the evening late on, as Milan ended the Serie A season with back-to-back wins.
The victory lifts them to what is still a below-par ninth place, with Inzaghi's future in doubt as a result of their struggles in his first campaign in charge.
Atalanta, who secured survival in the Italian top flight a couple of weeks ago, finish in 17th place.
Milan came out of the blocks strongly with Stephan El Shaarawy looking threatening, but clear-cut chances were few and far between before the hosts got to grips with the encounter.
Atalanta's German Denis had the first clear sight on goal in the 18th minute and he came within inches of breaking the deadlock.
The Argentinian took advantage of pedestrian Milan defending to ghost in between Philippe Mexes and Gabriel Paletta and power in a header that cannoned back off the crossbar.
Three minutes later there was no such let off for Inzaghi's charges.
This time it was Baselli's late run into the box that proved elusive, but the credit for that has to go to Maximiliano Moralez's inch-perfect cross, which made it easy for Baselli to nod home.
Milan surged forwards in search of an equaliser and almost found it in the 32nd minute when Mexes' effort was cleared off the line by Luca Cigarini, but they did not have long to wait - six minutes later they took the lead.
First, Pazzini was brought down in the box by a wild lunge from Andrea Masiello and the Milan forward made no mistake from the spot before Bonaventura notched against his former side.
El Shaarawy's chipped ball into the box created havoc among Atalanta's ranks, with Pazzini firing a loose ball against a post before the deflection fell kindly for Bonaventura to tap in.
Milan had been far from impressive in the first 45 minutes but when it counted their finishing was clinical and Atalanta had no answer.
With Inzaghi's side seemingly happy to protect what they had, the second half was a much cagier affair and Atalanta were unable to force the issue.
In the 67th minute Milan keeper Christian Abbiati spilled a cross but Alejandro Gomez was able to take advantage for the hosts and that pretty much summed up their efforts.
As the clock ran down the visitors were penned back with wave after wave of similar Atalanta attacks, but it was Bonaventura who had the final say 10 minutes from time.
The 25-year-old was simply in the right place at the right time again as he converted the rebound after Andrea Poli's cross evaded Atalanta keeper Marco Sportiello and came back off a post for him to put into an empty net.