An extra-time strike from Mattia Destro fired Roma into the semi-finals of the Coppa Italia at the expense of a dominant Fiorentina in an ill-tempered affair where three players were shown red cards.
A frantic first half saw both sides create a number of chances in front of goal, but the best opportunity fell to Fiorentina midfielder Alberto Aquilani when his free kick rattled the crossbar in the 42nd minute.
Roma came out strongly after the restart and they should have been ahead but for Norberto Neto's point-blank save from Alessandro Florenzi.
The visitors almost snatched the win at the end of normal time, only for Borja Valero to see his effort rattle the post.
Fiorentina claimed the better of the possession in the early stages of extra time, but it was Roma who broke the deadlock in the 97th minute through Destro.
The younger striker tapped home from close range after United States international Michael Bradley released Miralem Pjanic along the right flank and the Bosnian laid the ball on a plate with an inviting low cross.
Vincenzo Montella's side responded by putting the visitors under intense pressure, coming close in the first half of extra time through Juan Guillermo Cuadrado, whose 104th-minute strike rebounded off the upright.
One-way traffic ensued in the second period of extra time. Adem Ljajic blazed one over the crossbar as the home side grew ever more desperate and tensions spilled over right at the death when Roma's Rodrigo Taddei was sent off for dissent.
There was more controversy to come as Cuadrado and Dodo were both sent off for fighting in added time, leaving Roma with nine men and Fiorentina with 10.
However, making their numerical advantage count with just minutes left to play proved a bridge too far for Montella's men.