(CNN) -- Paolo Maldini and Luis Figo brought down the curtain on their remarkable careers as their Milan clubs both scored victories on the final day of the Serie A season.
Maldini was given a special presentation as he made his 902nd and final appearance for Milan.
The 40-year-old Maldini was playing his 902nd game for Milan who won 2-0 at Fiorentina while Portuguese international Figo helped champions Inter to a 4-3 home win over Atalanta.
Milan's victory helped them secure the third Champions League place in Italy and automatic qualification to the group stages.
Juventus, who beat Lazio 2-0 with Vincenzo Iaquinta scoring twice, finished level on points with Milan, while Fiorentina will go into the Champions League final qualifying round after finishing fourth.
Inter had clinched the title two weeks ago, with a Zlatan Ibrahimovic double making sure that they would round off their season in style, the Swede finishing Serie A's top scorer with 25 goals.
Figo has been with Inter since 2005 and has helped the club to four straight league titles to become a firm favorite with the fans who gave him a rousing farewell.
Former Italian international defender Maldini was completing an incredible 24 seasons at Milan.
Inter finished top with 84 points with Milan and Juventus on 74, with Fiorentina fourth with 68.
In the relegation dogfight, Torino joined Reggina and Lecce in making the drop from Serie A as they lost 3-2 at AS Roma.
Bologna beat Catania 3-1 to finish in the 17th place with 37 points, while Torino ended on 34.
Bari, Parma and the winner of the promotion playoff will be the newcomers in Serie A next season.