Veteran captain Francesco Totti scored a 97th-minute penalty as Roma scraped past second-tier side Cesena to reach the Coppa Italia semi-final.
Former Manchester City striker Edin Dzeko put Roma ahead, tapping home from Stephan El Shaarawy's pass.
Cesena - in the relegation zone in Serie B - equalised five minutes later through Luca Garritano.
But Totti, 40, scored with the last kick of the game in his 25th professional season at Roma.
Roma coach Luciano Spalletti said: "When Totti plays, even in training, he's the Muhammad Ali of football, always looking to land that knockout blow - to swing the punch no-one else can see.
"If he's on the pitch, it's a good idea to give him the ball. The more they get him on the ball, the more they'll get back in return - you get more back from Totti than the bank. He's the one who brought the fans back into the stadium from the car park last year."
The nine-time winners will face city rivals Lazio in the last four after they beat Inter Milan on Tuesday.
Felipe Anderson and Lucas Biglia scored in a 2-1 win at the San Siro.
Juventus play Napoli in the other semi-final.
Line-ups
Roma
Formation 3-4-2-1
- 19Alisson
- 2Rüdiger
- 44ManolasBooked at 90mins
- 3Nunes JesusSubstituted forNainggolanat 45'minutes
- 13da Silva Peres
- 6Strootman
- 5Paredes
- 21Mário Rui
- 8PerottiSubstituted forDzekoat 21'minutes
- 92El ShaarawySubstituted forEmersonat 82'minutes
- 10Totti
Substitutes
- 1Szczesny
- 4Nainggolan
- 7Grenier
- 9Dzeko
- 15Vermaelen
- 16De Rossi
- 18Lobont
- 20Fazio
- 30Santos da Silva
- 33Emerson
Cesena
Formation 3-5-2
- 1Agliardi
- 2Perticone
- 16Rigione
- 27Ligi
- 14Balzano
- 23Koné
- 24Vitale
- 5LaribiBooked at 44minsSubstituted forGarritanoat 57'minutesBooked at 69mins
- 33Renzetti
- 10CianoSubstituted forCoccoat 73'minutes
- 9RodriguezBooked at 84minsSubstituted forPanicoat 86'minutes
Substitutes
- 7Garritano
- 8Schiavone
- 11Cocco
- 13Gasperi
- 17Panico
- 28Setola
- 31Pompei
- 32Bardini
- 34Di Roberto
- Referee:
- Fabio Maresca
- Attendance:
- 26,204
Match Stats
- Possession
- Home69%
- Away31%
- Shots
- Home14
- Away15
- Shots on Target
- Home7
- Away4
- Corners
- Home3
- Away8
- Fouls
- Home13
- Away18