With a hat trick that made him the first player to score 100 Champions League goals, Cristiano Ronaldo led Real Madrid to a 4-2 win over 10-man Bayern Munich after extra time on Tuesday and put the defending champions back in the semifinals.
Ronaldo scored once in regulation and twice in extra time, while Marco Asensio also netted late for Madrid, which advanced 6-3 on aggregate after a 2-1 first leg win in Germany.
"In the big moments, Ronaldo always comes through," Madrid coach Zinedine Zidane said. "He scored five times in these two games, what else can I say?"
Ronaldo had scored both goals for Madrid in the first leg, when he became the first player to reach 100 goals in European club competition.
Bayern played a man down from the 84th minute after Arturo Vidal picked up his second yellow card of the night for a foul on Asensio.
"We deserved more," said Bayern coach Carlo Ancelotti, who complained about the refereeing. "The calls made by the referee hurt us a lot. The second yellow for Arturo should not have been a card, and Ronaldo had two goals when he was offside."
Ronaldo appeared to be in front of the defenders, and just offside, for his first goal in extra time.
Vidal appeared to mainly get the ball in his challenge on Asensio, although he could have received a second yellow earlier for a foul on Casemiro.
After Robert Lewandowski had scored a 53rd minute penalty for Bayern, an own-goal by Madrid defender Sergio Ramos in the 78th had given the German side a 2-1 lead in regulation time, and sent the game into extra time.
The victory at the Santiago Bernabeu Stadium put Madrid into the semifinals for the seventh straight season and kept alive its hopes of becoming the first team to retain the Champions League title since the competition's new format was created in 1992.
Madrid defeated city rival Atletico Madrid in the final both in 2014 and 2016.
Bayern, the 2013 Champions League winner, had made it at least to the semifinals for the last five seasons.
"We played a lot of difficult matches this season, but this one was the most difficult one," Zidane said. "In the end, over the two legs, we deserved to go through."
The opening 45 minutes were balanced between the two sides, but Bayern was dominant after halftime as it pressed forward, trying to overturn the first-leg deficit.
"The team was courageous," Bayern defender Philipp Lahm said. "It hurts to go out in extra time, but we were a man down for over an hour across the tie. I think the team deserved to go through."
Bayern also played with 10 men in the second half of the game in Germany.
Lewandowski, who had missed the first leg because of a right shoulder injury, calmly scored from the spot with a right-foot shot, sending Keylor Navas the wrong way.
The penalty was awarded after a foul by Casemiro on Arjen Robben.
Not long before the penalty, Marcelo had prevented Bayern from scoring by making a goal line clearance after a shot by Robben had beaten Navas.
Ronaldo scored his first goal of the night with a header in the 76th minute after a well-placed cross by Casemiro from the right flank.
Two minutes later, though, Ramos found his own net when his deflection sent the ball trickling across the goal line. The Spanish defender was making his 100th Champions League appearance.
Ronaldo put Madrid back in control when he chested down a pass by Ramos and fired a left-foot shot that went underneath Bayern goalkeeper Manuel Neuer in the 105th minute.
He added another from close range after a run by Marcelo down the left flank in the 110th, and Asensio sealed the victory after getting past a series of defenders and firing home from inside the area in the 112th.
Bayern was trying to become only the third team to reverse a first-leg home loss in Champions League history, along with Inter Milan in 2011 and Ajax in 1996.
"I think we played well overall and we can leave with our heads held high," Bayern defender Jerome Boateng said.
Security guards and Bayern fans got into a confrontation at the stands at halftime but the altercation ended quickly.
Atletico Madrid reached the Champions League semifinals for the third time in four seasons by ending Leicester's fairytale European journey on Tuesday, drawing 1-1 at the King Power Stadium to advance 2-1 on aggregate.
Once Atletico grabbed an away goal through Saul Niguez's first-half header, any hopes of the English champions extending their debut in Europe's elite competition seemed to be completely extinguished.
Especially since Atletico was looking technically superior, attacking with greater skill and potency and outplaying the European novices.
And yet the spirit that powered Leicester to a remarkable Premier League title triumph returned in the second half as a tactical switch to by caretaker manager Craig Shakespeare from 4-4-2 to 3-5-2 put Leicester firmly back in the game. The subdued atmosphere was lifted by Jamie Vardy's 61st-minute strike, but leveling the score on a chilly central England night wasn't sufficient.
A defense as sturdy as Atletico's wasn't going to allow Leicester to score the two goals it still required to go through as a succession of shots were intercepted.
"We were definitely in the ascendancy," Vardy said. "We brought Leo (Leonardo Ulloa at halftime) on to cause an aerial threat and it started paying dividends for us. They are probably used to playing teams who keep possession more, so we were going direct."
The tactic certainly made life difficult for Atletico.
"It was almost a pleasure to compete against them," Atletico coach Diego Simeone said through a translator. "They never gave up for one minute. They didn't let their heads drop. We lived in fear all night."
England's last Champions League representatives went out with a fight exactly eight years to the day since Leicester began its dazzling ascent by clinching the third-tier title, with the exhausted players collapsing the turf at the final whistle after pressing with grit and directness.
Leicester, which is 12th in the Premier League and not sure of survival, now faces up to the reality that it could be many years before the team can contemplate a return to the Champions League. Atletico will focus on trying to land the prize the keeps eluding Simeone. It was a finalist in both 2014 and 2016 but beaten by Real Madrid on both occasion, while a constant contender for the Spanish title.
"I wanted to make life hard for every team we played," said Simeone, who has been in charge since 2011. "It's satisfying now to say we are a competitive outfit."
Real could thwart Simeone's ambitions again.
Atletico's neighbor also reached to the semifinals on Tuesday, with Cristiano Ronaldo scoring a hat trick in a 4-2 victory over Bayern Munich after extra time that clinched a 6-3 aggregate win. The semifinal lineup will be completed on Wednesday when Barcelona hosts Juventus and Monaco faces Borussia Dortmund.
For Leicester, Tuesday felt like a closing of a chapter, and the buildup to the quarterfinal felt like that with the theatrics. The seats were covered in foil flags in blue, silver and gold for fans to hoist, while canons of dry ice were set off steam from the stadium roof.
Leicester, though, was blown away from kickoff by the sharper, vastly more experienced visitors, featuring nine starters from last year's final loss.
Antione Griezmann, whose controversial first-leg penalty had given Atletico the edge, was a constant menace. Not only gliding past defenders but also when tracking back on defensive duties of his own - disrupting the advance of Riyad Mahrez in one early intervention.
Leicester was finding pockets of space to attack but it allowed Niguez to score far too easily in the 26th minute, with the midfielder left unmarked to meet Filipe Luis's cross. Vardy was the closest Leicester player to Niguez as the header beat Kasper Schmeichel.
Ulloa came on at halftime with Ben Chilwell, whose impact was more immediate. Two efforts went over the crossbar, first from a dipping volley and then a header, before the left wingback created the equalizer. A shot was intercepted by central defender Stefan Savic and the loose ball fell for Vardy to power into the net.
It was the seventh goal for the revitalized Vardy in the 10 games under Shakespeare.
It lifted the subdued atmosphere, belief returned to the stadium that was scene of such unexpected euphoria. But the home fans couldn't will the ball into the net as Ulloa had a shot blocked on the line, Vardy struck straight at Savic and Mahrez angled a strike over the top.