Ten-man AC Milan lost 2-1 at Cagliari in its Serie A season finale on Sunday after conceding a stoppage-time goal.
Fabio Pisacane scored three minutes into added time from a rebound following a free kick by Joao Pedro.
Joao Pedro had given Cagliari the lead 17 minutes in after being set up by Marco Borriello.
Gianluca Lapadula equalized for Milan with a penalty in the 72nd but Milan defender Gabriel Paletta was sent off with his second yellow card three minutes later.
Milan, which had already qualified for the Europa League, finished sixth. Cagliari was 11th.
Later, Francesco Totti was playing his final match with Roma against Genoa after a 25-season career with his hometown club.