Bayern Munich goalkeeper Sven Ulreich committed a huge blunder and was punished by Karim Benzema, as two-time defending champions Real Madrid progressed to the Champions League final for the third year in a row.
Ulreich inexplicably allowed a backpass from Corentin Tolisso to evade him to gift Karim Benzema his second goal of the night at the Bernabeu, in a pulsating 2-2 draw that ensured Real progressed 4-3 on aggregate.
Bayern led early through Joshua Kimmich and a strike from James Rodriguez - on loan at the German club from Real - set up a tense finish.
However, the hosts withstood considerable pressure to keep their bid for a third successive title on track.
Real Madrid grab road win over Bayern Munich in Champions League semi
The defending champions will play Liverpool or Roma in the final in Kiev later this month, with the Premier League side leading 5-2 after the first leg.
Defeat was harsh on Bayern, who dominated large spells of the game. Knowing they needed to score at least twice, the Germans went straight on the attack and set the tie alight, as they snatched the lead after just three minutes.
Franck Ribery sent the ball out wide and Tolisso whipped in a cross from the right. Sergio Ramos should have dealt with it, but failed to clear and Kimmich pounced from close range.
Real responded quickly and Cristiano Ronaldo went close to levelling, as he fired wide from six yards.
The equaliser came on 11 minutes, as Mateo Kovacic spread play and Marcelo delivered a superb cross to the back post. He picked out an unmarked Benzema, who rose to power home a header.
The visitors then spurned a gilt-edged opportunity just after the half-hour mark, as Rodriguez volleyed over from close range, after Keylor Navas saved from Robert Lewandowski.
Ulreich's gaffe handed Real the lead in the first minute of the second half. Tolisso's backpass was poorly hit, but Ulreich, realising too late he could not handle, seemed to slip, before he completely missed the ball attempting to kick it and Benzema stole in for his second.
Bayern were not killed off and Navas did well to save a powerful shot from David Alaba, which took a wicked deflection.
Ronaldo side-footed over from six yards, but the German side regained control and levelled on the night, as Rodriguez struck at the second attempt after his initial shot was blocked.
Tolisso forced another save from Navas, before Rodriguez had another effort blocked, as Bayern sought the goal they required to progress.
They pressed to the end, forcing Real into a rearguard action, but could not find a way through.
Madrid, playing in their 250th Champions League match, are the first team to make it to three European finals in succession since Juventus from 1996-98.
PA