Cristiano Ronaldo scored a stoppage time penalty to send Real Madrid into the semi finals of the Champions League after 10-man Juventus had threatened to pull off one of the greatest ever comebacks with a 3-1 victory in the Bernabeu.
Los Blancos thought they had one foot in the last four courtesy of a Ronaldo-inspired 3-0 first-leg success in Turin, but they were given an almighty fright as two first-half headers from Mario Mandzukic and a Blaise Matuidi effort just past the hour levelled the tie.
The Bianconeri were superb all night and looked to have deservedly forced extra time until late, late drama erupted when Mehdi Benatia caught substitute Lucas Vazquez in the penalty box.
Gianluigi Buffon was sent off in the melee that ensued before Ronaldo beat substitute keeper, Wojciech Szczesny with the resulting spot kick to net for an 11th straight match in the competition on what was his 150th appearance.
It was harsh on the Old Lady and on Buffon, whose final match in the Champions League ended on a sad note, with one of the game's great goalkeeper's set to retire at the end of the season.
Real Madrid were below par but survive to fight another day and join Bayern Munich, Liverpool and Roma in Friday's draw for the last four.