Bayern Munich win on away goals.
Roy Makaay scored the quickest goal in Champions League history to help Bayern Munich overturn a first-leg deficit and put Real Madrid out of the competition.
Makaay netted the fastest goal in Champions League history
Makaay slid home after 10 seconds and Lucio's second-half header seemed to have sealed the win.
But Real won a penalty which sparked a row that saw Bayern's Mark van Bommel and Real's Mahamadou Diarra sent off - before Ruud van Nistelrooy scored.
Real's Sergio Ramos netted late on, but his strike was ruled out for handball.
Nine-time champions Real were woefully out of sorts and their sloppiness was exposed when Roberto Carlos failed to control Fernando Gago's pass from the kick-off.
Hasan Salihamidzic pounced and fed the ball to Makaay who swept past Iker Casillas from 15 yards.
Bayern dominated the first half with Lukas Podolski shooting straight at Casillas, Bastian Schweinsteiger sending a shot just wide and Daniel van Buyten and Van Bommel forcing saves.
Real finally came to life just before the break with Guti and Van Nistelrooy coming close before Raul found the side netting.
Fabio Capello's side pressed harder after half-time with Antonio Cassano firing over and Oliver Kahn palming away Van Nistelrooy's header.
Lucio's header gave Bayern some breathing space when he headed in Willy Sagnol's corner on 66 minutes - but it did not last long.
The referee awarded Real a penalty when Robinho was fouled close to the edge of the box and in the ensuing jostling Van Bommel and Diarra were sent off after being shown second yellow cards.
Van Nistelrooy converted and Real threw themselves at Bayern with the score level at 4-4 on aggregate, but the German side held firm and went through on away goals.
Bayern Munich: Kahn, Sagnol (Gorlitz 85), Lucio, Van Buyten, Lahm, Salihamidzic, Van Bommel, Hargreaves, Schweinsteiger, Makaay (Pizarro 69), Podolski (Demichelis 87).
Subs Not Used: Rensing, Scholl, Santa Cruz, Ottl
Sent Off: Van Bommel (81)
Booked: Van Bommel, Podolski
Goals: Makaay 1, Lucio 66
Real Madrid: Casillas, Miguel Torres, Sergio Ramos, Helguera, Roberto Carlos, Emerson (Guti 31), Gago (Robinho 75), Diarra, Raul, Higuain (Cassano 46), van Nistelrooy.
Subs Not Used: Diego Lopez, Salgado, Mejia, De la Red
Sent Off: Diarra (81)
Booked: Sergio Ramos, Guti, Diarra
Goals: van Nistelrooy 83 pen
Ref: L Michel (Slovakia)