Francesco Totti was in tears after a presentation to mark the final appearance of his 25-year Roma career.
The 40-year-old forward, who has scored 307 goals in 786 games for his only club, came on in the 54th minute in the win over Genoa to a standing ovation.
Roma won the game 3-2, with Diego Perotti’s last-minute winner securing a Champions League group stage spot.
After the game, Totti read a letter to the fans, including: “I’m afraid. I can’t see what the future looks like.”
He also said: “Imagine you’re a child having a good dream… and your mother wakes you up to go to school.
“You want to keep dreaming… you try to slip back into the dream but you never can.
“This time, it’s not a dream, but reality. And I can no longer slip back in.”
Captain Totti was also presented with a framed number 10, his famous shirt number, and had his wife and children on the pitch with him.
He is expected to become a Roma director but a statement during the week has led to reports he could play on elsewhere
The game did not start well for Roma. Pietro Pellegri, 16, became the first player born in 2001 to score a Serie A goal when he put Genoa 1-0 ahead.
Roma, who would have dropped into the Champions League play-offs had they failed to win, cancelled out that opener with a goal from Edin Dzeko.
With 16 minutes remaining, the former Manchester City striker pulled the ball back for Daniele de Rossi, also a one-club Roma legend, to put them ahead. Totti was standing right behind him ready to shoot.
Darko Lazovic equalised with a header but Perotti fired home in the final minute from Dzeko’s header to ensure Roma finished runners up to Juventus and one point above Napoli – who beat Sampdoria 4-2.
All the build-up to the game was dominated by talk of ‘Totti Day’ as it was known in Italy, although coach Luciano Spalletti, who has frequently kept the star on the bench this season, said the result was more important and did not start him.
He was awarded a special jersey by Genoa before the game, with Totti banners visible in the Stadio Olimpico crowd. The atmosphere rose when he replaced Mohamed Salah nine minutes into the second half.
Totti set up a chance for Stephan el Shaarawy with a great pass but rarely looked like adding to his own tally.
TOTTI IN NUMBERS
786 – competitive appearances for Roma in all competitions (a club record)
307 – competitive goals for Roma in all competitions (a club record)
25 – seasons played in Serie A, level with AC Milan’s Paolo Maldini
23 – seasons scored in Serie A (a record)
32 – his most goals in a season (2006-07). He won the Serie A golden boot and European Golden Shoe with 26 that season
16 – age he made his Roma debut
40 – age he made his final appearance for Roma
22 – the year he became Roma captain, the youngest club captain in Serie A history
1 – Serie A title in 2000-01
9 – Serie A runner-up finishes
16 – red cards in his career
Statistics sourced from BBC