Romelu Lukaku scored a 119th-minute winner to send Inter Milan into the Coppa Italia quarter-finals at the expense of Fiorentina.
Inter led through Arturo Vidal's first-half penalty but Christian Kouame equalised with a 57th-minute drive.
Just as it looked like penalties would be needed, substitute Lukaku thumped home a header to set up a last-eight tie against city rivals AC Milan.
In another last-16 tie, Juventus also needed extra time to beat Genoa.
They led 2-0 through Dejan Kulusevski and Alvaro Morata - but Lennart Czyborra and Filippo Melegoni got Genoa on level terms.
Tunisia midfielder Rafia, 21, scored on his debut in professional football as he bundled home Juve's winner in the 104th minute.
They face Sassuolo or Spal in the quarter-finals.
- 2Martínez Quarta
- 98dos Santos de PauloBooked at 79mins
- 22CáceresSubstituted forVenutiat 53'minutes
- 34S Amrabat
- 92EyssericBooked at 6minsSubstituted forVlahovicat 52'minutes
- 5BonaventuraBooked at 26mins
- 11KouaméBooked at 58minsSubstituted forCallejónat 97'minutes
- 32Dalle Mura
- 37SkriniarBooked at 45minsSubstituted forde Vrijat 61'minutes
- 13RanocchiaBooked at 117mins
- 15YoungSubstituted forHakimiat 69'minutesBooked at 112mins
- 22VidalBooked at 84minsSubstituted forBrozovicat 94'minutes
- 24EriksenBooked at 79mins
- 5GagliardiniSubstituted forBarellaat 81'minutes
- 7SánchezBooked at 120mins
- 10MartínezSubstituted forLukakuat 69'minutesBooked at 120mins
- 6de Vrij
- Davide Massa
- Shots on Target
- Mark Wright joins Crawley Town: Can the TV personality make it as a pro footballer?
- The Serpent: New drama brings the chilling crimes of Charles Sobhraj to life