Antoine Griezmann and Rodrigo Riquelme netted for Atletico in the extra 30 minutes.
Atletico Madrid dumped Real Madrid out of the Copa del Rey on Thursday night, beating their city rivals 4-2 after extra-time at the Wanda Metropolitano.
Samuel Lino and Alvaro Morata twice had Los Colchoneros ahead, with Real replying with a Jan Oblak own goal and Joselu header.
However, Antoine Griezmann and Rodrigo Riquelme netted for Atletico in the extra 30 minutes, taking Diego Simeone’s team into the quarter-finals as they seek to win the competition for the first time since 2013.
Jude Bellingham had a shot blocked for holders Real in the 11th minute, then team-mate Vinicius Junior was denied by Oblak nine minutes later.
Rodrigo De Paul saw his header saved at the other end two minutes later, before seeing a shot blocked soon after.
Former Real striker Morata had a 26th-minute shot saved by Andriy Lunin and then Vinicius shot over six minutes later.
The deadlock was broken six minutes before the interval when Lino slid in to convert from six yards after reacting smartly to Antonio Rudiger’s misplaced header.
However, the defending champions were level in the first minute of first-half added-time when Oblak turned the ball into his own goal as he attempted to deal with Luka Modric’s inswinging free-kick, under pressure from Vinicius.
Atleti regained their advantage in the 57th minute, Morata tapping in after Rudiger and Lunin had failed to deal with a ball which deflected goalwards off Eduardo Camavinga. The former Chelsea man was booked for celebrating the breakthrough with the Atletico fans behind the goal.
Rodrygo had a shot blocked 15 minutes from time as the 20-time winners sought an equaliser, which they got soon after Morata had been brilliantly denied by Lunin in the 81st minute.
Real broke away and Vinicius played in Bellingham, who crossed for Joselu to head in from six yards – less than two minutes after coming on as a replacement for Rodrygo. The goal was allowed to stand after a VAR check for offside.
The closing stages of the 90 minutes were more memorable for yellow cards than chances but Vinicius came close to an added-time winner with an audacious flick from Rudiger’s ball to the far post.
Griezmann gave Atletico the lead for the third time with his 175th goal for the club, 10 minutes into extra-time.
The 32-year-old France international, who last week became the club’s all-time record goalscorer with his goal in the Spanish Super Cup loss to the same opponents, beat Vinicius to the ball and held off the Brazilian before cutting inside and firing left-footed over Lunin.
Bellingham was denied by Oblak, then Dani Ceballos tapped in with nine minutes remaining after the keeper had spilled Bellingham’s shot. However, VAR ruled the effort out with the England man in an offside position.
Doubts about the outcome were ended in the final minute of extra-time when Memphis Depay set up fellow substitute Riquelme for Atletico’s fourth.