Zlatan Ibrahimovic bounced back from missing a penalty by scoring to help Milan round off their fine finish to the Serie A season with a comprehensive 3-0 home victory over Cagliari.
A supreme run of form that has secured Stefano Pioli's future as head coach continued as Milan, who were sure of finishing sixth regardless of Sunday's (AEST) outcome, moved to 13 games unbeaten since the restart.
Ragnar Klavan scored an own goal after 10 minutes of a first half that also saw Ibrahimovic's spot-kick saved by Alessio Cragno.
Pioli said ahead of the game he was hopeful it would not prove to be Ibrahimovic's last for the club as negotiations over a new contract continue.
And the former Sweden international showed what the fuss was about with a fine strike after 55 minutes, which was swiftly followed up by a goal from Samu Castillejo.
Milan impressed again despite missing the suspended Ante Rebic, with Cagliari, who did not manage a shot on target until stoppage time, unable to follow up their win over Juventus last time out with another signature result.
Klavan lost possession before he was helpless as a shot from Rafael Leao, who had been fed by Hakan Calhanoglu, hit the post and deflected into the net from close range.
Cagliari goalkeeper Cragno denied Ibrahimovic before Davide Calabria's right-wing cross found Leao, who sent a spectacular acrobatic effort against the crossbar.
An injured Leao was replaced by Giacomo Bonaventura and Ibrahimovic, who helped earn the penalty when his aerial effort was handled by Sebastian Walukiewicz, was denied from the spot a minute before the break when Cragno dived to his right.
Ibrahimovic laid a chance on a plate for Calhanoglu, who somehow bounced his effort over from six yards, but the veteran scored himself in Milan's next attack, taking a touch and firing into the top corner after being found by Castillejo's first-time pass.
Castillejo scored himself two minutes later, sending in a cool close-range finish after a slick one-two with Bonaventura.
Having had little to do, Milan captain Gianluigi Donnarumma impressively saved Paolo Farago's header in the final moments to preserve his clean sheet.
What does it mean? Hope for Milan
Milan's magnificent end to the campaign will give them hope for next season under Pioli, especially if an arrangement can be made to keep Ibrahimovic at the club as a focal point for some of their exciting attacking talent to play around.
Ibrahimovic signed a short-term contract to return to Milan in January and has scored 10 goals in 18 Serie A appearances, helping to revive a club and coach who are now desperate to keep him.
Despite missing a penalty, he was a constant threat once again and became the oldest player – at 38 years and 302 days – to score 10 or more goals in a single Serie A season.
The lively Leao forced the own goal and had a wonderful effort that hit the bar before he was substituted with an injury in the 38th minute.
The Portuguese youngster had ice on his thigh and Pioli will hope it is not a problem that runs into preparations for the new season, with a short turnaround and Europa League qualifiers on the horizon.