AS Roma celebrated Francesco Totti’s final game after 25 seasons at the club by beating Genoa 3-2 to clinch second place in Serie A on Sunday.
But it was not an easy day, after 16-year-old Pietro Pellegri had given the visitors a shock lead.
One-club man Totti came on in the 54th minute for his 786th appearance, and his 619th in Serie A, in what had been dubbed “Totti Day” by Italian media.
Diego Perotti grabbed a 90th-minute winner for Roma as they finished one point ahead of Napoli whose 4-2 win at Sampdoria was in vain.
The win means that Roma qualify directly for next year’s UEFA Champions League group stage while Napoli’s third place sends them into the final qualifying round.
The round is a dreaded one, where Italian clubs have lost in six of the previous eight seasons.
Roma finished on 87 points, four behind Juventus who finished their campaign with a 2-1 win at Bologna on Saturday.
Totti confirmed on Thursday that the match would be his last for Roma, who did not offer him a new contract, but hinted he could continue his career elsewhere.
“There are people who are not normal. There are careers that are not normal. I saw a banner that said the real battle against modern football is to wear the same jersey for 25 years,” said midfielder Daniele De Rossi, who himself has been at the club since 2001-02.
Roma were quickly in trouble as Pellegri sprinted clear of their defence and fired past Wojciech Szczesny in the third minute to become the first player born in 2001 to score a Serie A goal.
Edin Dzeko levelled seven minutes later with his 29th goal of the season, finishing as Serie A top scorer, and Roma missed a succession of chances before halftime.
The fact that there was so much at stake for Roma added some real drama to an already highly-charged, emotional occasion.
Coach Luciano Spalletti, who has restricted Totti’s playing time this season, duly brought on the 40-year-old talisman in the second half.
Totti created two good chances before Dzeko got behind the Genoa defence and pulled back the ball for De Rossi to slam home in the 74th minute.
But Genoa had not read the script and five minutes later Diego Laxalt floated over a cross which Szczesny missed and Darko Lazovic headed the equaliser at the far post.
Lazovic hit the post on another Genoa counter but, just as it seemed that Genoa were about to wreck the party, substitute Perotti popped up to fire in his late winner.
Lorenzo Insigne provided the highlight of Napoli’s win when he broke down the left and sent a dipping shot over Christian Puggioni from a seemingly impossible angle just before halftime.
The goal put them 2-0 up after Dries Mertens had opened the scoring.
Marek Hamsik and Jose Callejon were on target in the second half for Napoli, the league’s highest scorers with 94 goals, while Fabio Quagliarella and Ricardo Alvarez replied for Sampdoria.