Borussia Dortmund weathered a Real Madrid storm to reach the Champions League final despite losing 2-0 at the Bernabeu.
Juergen Klopp's side looked to be sailing through to Wembley as they preserved their 4-1 first leg lead into the last 10 minutes.
But substitute Karim Benzema brought the tie to life with a close-range finish from a Mesut Ozil cross - and when Sergio Ramos rammed the ball into the roof of the net on 88 minutes a staggering comeback looked likely as panic set in for the visitors.
Real left their goal flurry too late, though, and Dortmund held on 4-3 aggregate to reach their second final - their other came in 1997 when they defeated Juventus 3-1. It is likely to be an all-German affair, with Bayern Munich taking a four-goal cushion into their second leg in Barcelona on Wednesday.
Jose Mourinho's players paid the price not just for their calamitous first leg performance in Germany, but their failure to score in an electric opening 15 minutes in Madrid.
The home side started with frightening intensity. Gonzalo Higuain had a glorious chance on four minutes when Ozil found him in the box, but the striker delayed his shot and Roman Weidenfeller made a good save.
Cristiano Ronaldo blazed into the crowd from the edge of the box before he and Robert Lewandowski both failed to convert from similar chances.
First Lewandowski escaped Ramos, used his chest to control the ball and volleyed into the ground with the goal at his mercy.
Then came Ronaldo's chance. He controlled in almost identical fashion and made better contact with the volley, but powered the ball straight at Weidenfeller.
Next came Ozil's chance to miss a glorious chance as Higuain found him in space but the German dragged his shot wide.
Eventually Dortmund found their feet and gained a foothold thanks to the industry of Sven Bender and Ilkay Gundogan in central midfield.
As the visitors came into the game, Madrid grew tetchy.
Mourinho was reportedly upset that his players failed to foul Lewandowski during his four-goal first-leg performance, and they made up for lost time here.
Ramos stuck an arm in the Pole's face at every opportunity in a remarkably dirty performance, while Fabio Coentrao was lucky to stay in the pitch with a studs-up challenge that skewered Lewandowski painfully on the ankle.
Meanwhile Higuain found his way into referee Howard Webb's book for dissent after he was correctly flagged offside.
As the game progressed, Real's increasing commitment to attack presented Dortmund with some golden opportunities.
Having scored four times last week, Lewandowski's finishing deserted him as he fired over before smashing his shot against the underside of the bar when played through by Marco Reus.
The otherwise superb Gundogan then perpetrated the miss of the night when Reus supplied him with a virtual open goal - Gundogan struck his shot close enough to Diego Lopez for the goalkeeper to make a brilliant diving save.
Lewandowski fired off target with another shot before seeing yet another blocked by Michael Essien.
Madrid eventually punished their visitors' profligacy on 83 minutes, when Ozil supplied a pinpoint low ball from the right side of the box and Benzema - on for the wasteful Higuain - made no mistake.
Real poured forward as Dortmund manned the barricades, and five minutes later Ramos smashed the ball into the roof of the net after Benzema teed him up in a crowded penalty box.
Dortmund's insistence on trying to score rather than heading to the corner flag to run the clock down created some unnecessary alarms, but referee Webb signalled the end of their torture after waving away Ronaldo's penalty claims following a Felipe Santana challenge.
Injuries to Mario Goetze and Bender took some gloss off Dortmund's achievement, but Klopp's side are worthy finalists.
MAN OF THE MATCH
Mats Hummels (Borussia Dortmund): A commanding defensive display from the Dortmund centre-back who exuded calmness and authority.
REAL MADRID: Diego Lopez 8, Essien 6, Varane 7, Ramos 7, Coentrao 6, Ozil 8, Xabi Alonso 6, Modric 6, Di Maria 6, Ronaldo 7, Higuain 5.... Subs: Khedira 6, Kaka 5, Benzema 7.
BORUSSIA DORTMUND: Weidenfeller 7, Piszczek 7, Subotic 7, Hummels 8, Schmelzer 7, Bender 7, Gundogan 7, Goetze 6, Reus 7, Blaszczykowski 6, Lewandowski 5... Subs: Grosskreutz 6, Felipe Santana N/A, Kehl N/A.