Cristiano Ronaldo scored a hat-trick as holders Real Madrid controversially overcame Bayern Munich in extra time to reach the Champions League semi-finals.
Bayern Munich midfielder Arturo Vidal's harsh 84th-minute dismissal was the first pivotal moment of a thrilling game, and then Ronaldo was clearly standing in an offside position to score Madrid's second in extra time.
Needing at least two goals to progress, Bayern had led when Robert Lewandowski confidently drilled in a penalty.
Madrid struggled to find rhythm at a nervy Bernabeu before Ronaldo headed in Casemiro's precise cross.
Bayern responded just 36 seconds later as Sergio Ramos' own goal forced extra time, but then crumbled after Ronaldo illegally fired in Madrid's second.
The Portugal captain tapped in the third - for his 100th Champions League goal - after Marcelo's marauding run, with Marco Asensio sealing victory by firing into the bottom corner.
Madrid will discover their semi-final opponents when the draw is made on Friday.
Neighbours Atletico Madrid progressed after edging past Leicester City, while the other two ties - Barcelona against Juventus, and Monaco against Borussia Dortmund - take place on Wednesday.