Cristiano Ronaldo's stoppage-time penalty saved holders Real Madrid from a stunning Champions League exit against Juventus, the holders progressing 4-3 on aggregate after a night of high drama at the Santiago Bernabeu.
Juve seemed set to match the heroics of fellow Serie A side Roma against Barcelona at the Stadio Olimpico 24 hours earlier after surging into a 3-0 lead in the Spanish capital, only for Lucas Vazquez to draw a foul in the box and Ronaldo to settle the contest from the spot.
That came after lengthy delay in which Gianluigi Buffon saw red for dissent at the decision – the veteran goalkeeper's first dismissal in his 117th, and likely final, outing in the competition.
Mario Mandzukic's first-half brace, both headed efforts, sparked life into a contest that looked over after the first leg in Turin.
And when Keylor Navas – who seemed unsettled without suspended captain Sergio Ramos in front of him – fumbled a Douglas Costa cross at the feet of Blaise Matuidi, Massimiliano Allegri's side drew level in the tie with half an hour of the 90 still to play.
Extra time beckoned but a clumsy challenge on Vazquez by Medhi Benatia saw referee Michael Oliver point to the spot, Buffon sent off for his vociferous protests, meaning Wojciech Szczesny came on to face the penalty.
Ronaldo – who hit a double including a superb overhead kick in Madrid's first-leg win – duly smashed home a nerveless spot-kick to maintain his sensational run of scoring in every game in this season's Champions League, on what was his 150th appearance in the competition, to spare the blushes of Zinedine Zidane's men.
1 - Gianluigi Buffon has been sent off in the Champions League for the 1st time in his career (117 games). End. pic.twitter.com/0QpObjUmNC— OptaJean (@OptaJean) April 11, 2018
Juve needed to strike early to give themselves hope and they did exactly that with a mere 76 seconds on the clock.
Douglas Costa won the ball on the halfway line and fed Sami Khedira, the Germany international floating a perfect cross to the back post for Mandzukic to thump in a powerful header.
Navas parried Douglas Costa's cross-shot and the Costa Rica international made a vital save from Gonzalo Higuain on the rebound as Juve maintained their high-tempo start.
Gareth Bale – preferred to Karim Benzema in attack – forced a smart stop from Buffon, the Wales star sending the loose ball into the side netting with an improvised backheel.
Madrid had the ball in the net after 13 minutes, Isco cutely chipping Buffon after the goalkeeper saved from Cristiano Ronaldo, before Mandzukic could only bundle a corner straight at Navas.
After the chaotic opening Madrid gradually gained control, Marcelo driving over the angle and Buffon denying Isco after the playmaker beat the offside trap to race on to Ronaldo's pass.
But just as Madrid seemed to be taking the sting out of the game Mandzukic scored another, the striker arriving at the back post again to head home Stephan Lichtsteiner's right-wing cross.
Raphael Varane thudded a header against the crossbar from Toni Kroos' free-kick, but Madrid were reeling when the half-time whistle arrived.
Zidane responded by replacing Casemiro and Bale with Marco Asensio and Lucas Vazquez at the interval and Buffon scrambled to keep out Ronaldo's 58th-minute snapshot.
Navas pushed away Higuain's shot but the goalkeeper's massive mistake then gifted Juve the leveller.
Douglas Costa's cross looked innocuous but Navas, under close attention from Matuidi, spilled the centre for the midfielder to nudge in his first Champions League goal since November 2016.
With 12 minutes left, Buffon made a fine save low to his right to tip away Isco's deflected effort, then Ronaldo misjudged a back-post header when he looked set to convert.
But the Portugal superstar still managed to have the decisive impact after Benatia bumped Vazquez over as the substitute stooped to score.
Buffon's aggressive response towards the official saw the 40-year-old dismissed in what could be his final Champions League appearance, leading to a long delay as Szczesny was readied.
The wait did not affect Ronaldo, though, Madrid's talisman hammering the penalty into the goalkeeper's top-left corner in the seventh minute of added time to settle a stirring contest and keep Zidane's chances of claiming a third consecutive Champions League crown alive in scarcely believable fashion.
Key Opta facts:
- Despite defeat, Real Madrid have reached the Champions League semi-finals for a record eighth consecutive season.
- Cristiano Ronaldo has scored 10 Champions League goals against Juventus – the most by one player against a specific opponent in the competition.
- Juventus have won more away games against Real Madrid than any other side in all European competition (3).
- Gianluigi Buffon's first Champions League red card was Juventus' sixth in the competition against Real Madrid – more than any team has had against another opponent in the competition.
- Mario Mandzukic's first goal after 76 seconds was the fastest that Real Madrid have ever conceded in a Champions League home game.
- Mandzukic also became the first player to score a first-half brace as an opposition player in a Champions League match at the Santiago Bernabeu.