Gigi Buffon was sent off for dissent as Cristiano Ronaldo converted a stoppage-time penalty, meaning the Juventus 3-1 win was in vain.
The first leg was a 3-0 humiliation on home turf in which Paulo Dybala was sent off and Cristiano Ronaldo scored a stunning overhead kick. Dybala and Rodrigo Bentancur were suspended with Andrea Barzagli and Federico Bernardeschi injured, but Miralem Pjanic and Medhi Benatia returned from bans. Sergio Ramos was suspended for the hosts, replaced by 21-year-old Champions League debutant Jesus Vallejo, while Gareth Bale was surprisingly picked rather than Karim Benzema.
It was the perfect start for Juve at the Bernabeu, as within 76 seconds Sami Khedira whipped in a cross to find Mario Mandzukic totally unmarked for a free header at the back post.
There was nearly a second and again it was sparked by Douglas Costa running at the panicked Merengues defence, but this time Keylor Navas got a hand to both the low cross and Gonzalo Higuain’s follow-up from close range.
Gigi Buffon was also tested on what might be his final Champions League match, denying Bale from close range and the Welsh wizard back-heeled the rebound on to the side-netting. Giorgio Chiellini then made a crucial interception to stop Isco’s assist, while at the other end Dani Carvajal risked an own goal with his clearance over the bar.
Buffon parried a Cristiano Ronaldo solo effort into the path of Isco, who was marginally offside when turning in the rebound.
Juve were forced into an early change, as Mattia De Sciglio limped off to make way for Stephan Lichtsteiner just 17 minutes in. The former Milan man wanted to carry on and run it off, but Max Allegri immediately made the switch.
Marcelo’s half-volley flew well over and Buffon denied Isco from six yards after the offside trap failed, but Juventus doubled their lead with a very similar goal to the first. A Lichtsteiner cross came in from the right and Mandzukic nodded in at the back post, out-leaping Carvajal.
Real Madrid had the chance to grab one back on the stroke of half-time, but Raphael Varane’s header from a free kick smacked against the bar.
Zinedine Zidane wasted no time, making a double change for the second half with Lucas Vazquez and Marco Asensio replacing Bale and Casemiro.
Douglas Costa blasted over the bar and Buffon beat away a tricky Lucas Vazquez cross-shot, while Keylor Navas palmed away a Higuain snapshot.
Navas was at fault for the third goal, though, as he fumbled a Douglas Costa cross and Blaise Matuidi – who was dropped for the first leg – turned the loose ball into an empty net from a couple of yards.
That made it 3-0 on the night, 3-3 on aggregate, and as things stood this was going to extra time at the stunned into silence Bernabeu. It also meant that if Juve got a fourth, Real Madrid would need to win on aggregate, as the Bianconeri would have the advantage on away goals.
Buffon was wrong-footed by a deflection on Isco’s low drive, but scrambled back to fingertip it round the base of the near post. Varane then turned wide from the corner and Ronaldo nodded over, but just as they were 30 seconds away from extra time, the unthinkable happened.
Benatia clumsily nudged Lucas Vazquez in the back and the English referee Michael Oliver awarded a penalty. However, replays from other angles show that Benatia got the ball with his boot and Vazquez went down very easily.
Buffon’s protests were so furious that he was sent off, so Wojciech Szczesny had to replace Higuain and his first act was plucking a Cristiano Ronaldo penalty out of the net seven minutes into stoppages.
Real Madrid 1-3 Juventus (4-3 agg)
Mandzukic 2, 37 (J), Matuidi 60 (J), Cristiano Ronaldo pen 97 (M)
Real Madrid: Navas; Carvajal, Varane, Vallejo, Marcelo; Casemiro, Modric (Kovacic 75), Kroos; Isco, Bale, Cristiano Ronaldo
Juventus: Buffon; De Sciglio (Lichtsteiner 17), Benatia, Chiellini, Alex Sandro; Khedira, Pjanic, Matuidi; Douglas Costa, Higuain, Mandzukic
Ref: Oliver (ENG)
Sent off: Buffon 93 (J)