Luka Modric turned the tie and Karim Benzema settled it as Real Madrid held off a sensational fightback from Chelsea on Tuesday to win an enthralling Champions League quarter-final 5-4 on aggregate.
Chelsea wiped out Madrid's 3-1 lead from the first leg in stunning fashion at the Santiago Bernabeu as Mason Mount, Antonio Rudiger and Timo Werner put Europe's reigning champions on the brink of an incredible victory.
But the 36-year-old Modric intervened with another moment of genius to add to the very best of his glittering career, a sumptuous pass with the outside of his right foot setting up Rodrygo to volley in and sending a nerve-shredding contest into extra time.
After scoring a hat-trick at Stamford Bridge, Benzema then stepped forward to claim the winner, the Frenchman capitalising on a Rudiger slip to head in, a 3-2 defeat enough to see Madrid into the semi-finals.
"You can never think anything is lost at the Bernabeu," said Carlo Ancelotti afterwards. "I can't explain it but there is a magic in this stadium that helps you."
At the final whistle, Modric and Benzema dropped to the floor, their combined 70 years of age belying another two vintage contributions that have dragged Real Madrid in sight of a 14th European Cup.
They will face either Manchester City or rivals Atletico Madrid in the last four.
After being thrashed by Brentford and then outplayed by Madrid in the first leg last week, Chelsea came in rejuvenated after putting six past Southampton in the Premier League last weekend.
Thomas Tuchel said on Monday they would need a "fantastic script" to pull off this comeback and they certainly delivered that, their only failing an inability to prevent Modric and Benzema doing what they have done so many times before.
"We were unlucky, that's why we're disappointed," said Tuchel. "We got beaten by pure individual quality and our own mistakes. We deserved to go through."
Mount's goal in the 15th minute set the tone, Madrid immediately consumed by tension and Chelsea given early hope.
Mateo Kovacic had been key in the build-up but it was Ruben Loftus-Cheek's quick pass into Werner that caught Madrid cold, the German steering the ball with his knee into the path of Mount, who advanced and fired past Thibaut Courtois.
For 20 minutes, Chelsea were dictating, Madrid pegged back. Reece James was doing a fine job restricting Vinicius Junior, blocking Madrid's escape route.
Benzema, Modric and Toni Kroos tried to wrestle back control but Chelsea's authority was even more pronounced early in the second half and within minutes they had a second, Rudiger rising high at the back post to head in from a corner.
With their lead gone, Madrid briefly exerted, the crowd coming into the contest. But Chelsea were celebrating a third when Marcos Alonso pivoted round Dani Carvajal's sliding tackle and slammed into the top corner.
Madrid looked beaten, the stadium dead, but the referee was waiting. VAR spotted Alonso had controlled with his hand and when the decision was reversed, the Bernabeu erupted.
With 28 minutes left, the tie was back in the balance. Madrid had renewed impetus and almost scored, Benzema's looping header at the back post dropping onto the crossbar.
But it was brief, Chelsea coming again in the 73rd minute as Kovacic slid through Werner, who coolly slalomed past two sliding Madrid defenders and sent a deflected finish dribbling into the corner.
A disappointed Kroos was taken off before a wild contest turned again on the moment of magic from Modric. With the outside of his foot, Modric stroked a 30-yard pass over to the right of the penalty area where Rodrygo, on as a substitute, volleyed in.
Chelsea looked the more likely to nick a late winner and nearly did, Kai Havertz nodding across the six-yard box but Christian Pulisic shot over.
Into extra time and Madrid found another gear, Vinicius finally finding space to tear into. His floated cross might have been easily cleared by Rudiger but the defender slipped, giving Benzema just enough space to guide his header in.
Chelsea, so composed all night, suddenly looked ragged. Eduardo Camavinga fired over. Courtois Cruyff-turned around Havertz.
But they threw everything at Madrid in the final minutes, Courtois saving from Werner before Fede Valverde had to block a shot from Thiago Silva. Edouard Mendy went up for a final corner but it was cleared, Madrid holding on.
Villarreal stun Bayern
In Tuesday's other quarter-final, Villarreal eliminated Bayern Munich.
Samuel Chukwueze's 88th-minute strike at the Allianz Arena gave the Spaniards a 1-1 draw in the second leg of their quarter-final tie that took them through 2-1 on aggregate.
Robert Lewandowski had put Bayern ahead on the night to level the tie on aggregate after Villarreal's 1-0 first-leg win, and extra time loomed until Chukwueze struck.
Unai Emery's Villarreal continued their remarkable European run, having also surprised Juventus in the last 16 with a 3-0 win in Turin.