Antoine Griezmann grabbed the decisive goal as Atletico Madrid hit Bayern Munich with a sucker punch to reach the Champions League final.
Griezmann tucked away Atletico's first shot on target for the crucial away goal to cancel out Xabi Alonso's first-half strike.
On a dramatic night with both sides missing a penalty, Robert Lewandowski put Bayern back ahead 2-1 on the night and levelled the tie 2-2 on aggregate.
But they could not find a second as Atletico progressed on away goals, with Bayern suffering more semi-final woe while Diego Simeone's side will face either Real Madrid or Manchester City in Milan at the end of the month.
Atletico led courtesy of Saul Niguez's solo goal at the Vicente Calderon last week but Bayern had won their last 11 Champions League games in Munich.
The Spanish game plan was clear when goalkeeper Jan Oblak was warned about time-wasting with barely 25 minutes played.
Lewandowski had already headed a decent chance wide and was then twice denied by Oblak.
The striker attempted to snaffle the rebound after Franck Ribery's drive was saved, with Oblak perhaps fortunate not to give a penalty away for his challenge.
Then Thomas Muller was put clean through by Jerome Boateng but opted to pass rather than shoot, with Oblak blocking Lewandowski's effort.
Atletico's defence was breached for the first time in more than 10 hours when David Alaba was tripped on the edge of the area in the 31st minute.
Alonso drilled his free-kick hard and low and it took a big deflection off Jose Maria Gimenez on its way into the net to level the tie.
Moments later Gimenez was in the thick of the action again for the wrong reason as he tugged back Javi Martinez to give away a spot-kick.
However Oblak read Muller's side-footed penalty correctly, diving to his right to make a fine save.
Gimenez redeemed himself shortly before half-time with some last-ditch defending to block Muller's cross with Lewandowski poised to apply the finish.
Oblak and Gimenez's heroics were put into perspective nine minutes after the break when Griezmann grabbed Atletico's crucial away goal.
It was a classic counter-attack as Fernando Torres sent Griezmann racing through and the France international, played onside by David Alaba, kept his cool to whip the ball past Manuel Neuer.
Bayern now needed two goals to progress, and they got one when Lewandowski pounced from close range from Arturo Vidal's header back across goal.
However, Atletico were awarded a controversial penalty when Torres, seemingly just outside the area, was tripped by Martinez only for the striker to see his spot-kick palmed away by Neuer.
Bayern piled forward but could not find a way through in a frantic finish as Atletico held out to secure their passage to the San Siro.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies