AC Milan veteran Zlatan Ibrahimovic had a penalty saved but later scored as his side finished the Serie A season with a 3-0 win over Cagliari on Saturday.
The 38-year-old, possibly playing the final match of his second stint at the club, took his tally to 10 league goals since returning in January and became the oldest player to score 10 or more goals in a Serie A season.
The Swede's contract ended with Saturday's match although he could extend it into next season according to some Italian media reports.
AC Milan went ahead with an own goal by Ragnar Klavan in the 11th minute. Rafael Leao hit the post from a narrow angle but the ball bounced off the Estonian defender and into the net.
Leao also rattled the crossbar before Milan were awarded a penalty for handball by Sebastian Walukiewicz one minute before halftime. However, Ibrahimovic's spot kick was saved by Alessio Cragno.
Ibrahimovic made amends when he scored with an emphatic finish from Samu Castillejo's pass in the 55th minute, and Castillejo exchanged passes with Giacoma Bonaventura to score the third two minutes later.
Milan, unbeaten since the season restarted in June, finished sixth with 66 points and will play in the Europa League qualifying rounds next season.
Serie A champions Juventus suffered their first home league defeat for over two years when they finished the season by losing 3-1 against AS Roma.
The Turin side, last beaten on their own ground in a Serie A match by Napoli in April 2018, have lost both their games since clinching the title one week ago and finished the campaign with 83 points, one ahead of Inter Milan.
Juventus, who host Olympique Lyonnais in a Champions League round of 16, second leg on Friday, rested several regulars including Cristiano Ronaldo but went ahead with a Gonzalo Higuain goal in the fifth minute.
Nikola Kalinic headed Roma level and Diego Perotti put the visitors ahead from a penalty before half-time. Perotti added the third in the 52nd minute following a dazzling run by Nicolo Zaniolo.
Lazio forward Ciro Immobile equalled the Serie A scoring record for a single season when he was on target in his side's 3-1 loss at Napoli in their final game of the season on Saturday.
The 30-year-old took his tally to 36 goals, equalling the record set by Higuain for Napoli in the 2015/16 season. He also finished the season five goals clear of the next leading scorer, Ronaldo of Juventus.
Fabian Ruiz gave Napoli a ninth-minute lead with a shot from outside the penalty area which took a deflection and looped into the net, leaving goalkeeper Thomas Strakosha helpless.
Lorenzo Insigne struck the post for Napoli before Immobile equalised in the 22nd minute, sweeping the ball between goalkeeper David Ospina and his near post from Adam Marusic's pass.
Napoli regained the lead from a penalty in the 54th minute, Insigne sending Strakosha the wrong way after Dries Mertens was caught by Marco Parolo when he was about to shoot. Matteo Politano added a third in stoppage time.
Lazio finished fourth with 78 points and Coppa Italia winners Napoli ended the season seventh with 62 points.
Inter Milan clinched second place in Serie A, disparagingly described by coach Antonio Conte last month as the "best of the losers", when they ended Atalanta's 19-match unbeaten run with a 2-0 away win on Saturday.
Danilo D'Ambrosio and Ashley Young scored in the opening 20 minutes as Inter finished the season with 82 points, one behind leaders Juventus who lost their final game 3-1 at home to AS Roma.
Atalanta, whose last defeat was at home to SPAL in Serie A in January, finished third with 78 points. The hosts appeared to have one eye on their Champions League quarter-final against Paris St Germain on August 12.
Inter Milan were off the mark in less than two minutes when Atalanta goalkeeper Pierluigi Gollini flapped at a corner and D'Ambrosio headed into the net. Gollini was injured in the process and had to be replaced by Marco Sportiello.
Ashley Young extended Inter's lead with a delightful goal after 20 minutes, cutting inside and then curling the ball past Sportiello from the edge of the area.
Last month, Conte, frustrated after seeing his team let several games slip from their grasp, said he was not interested in the race for second place.
"I say it's the first of the losers. There are those who are content with this, but it has no meaning for me," he said.
Earlier in the day, relegated Brescia finished with a 1-1 draw at home to Claudio Ranieri's Sampdoria after Ernesto Torregrossa cancelled out Mehdi Leris' opener while the visitors had Kristoffer Askildsen sent off in stoppage-time for a second bookable offence.