BARCELONA, Spain (AP) — Fernando Torres scored twice as Atletico Madrid ended Real Madrid's defense of the Copa del Rey title with a 2-2 draw on Thursday, maintaining its dominance over its crosstown rival this season.

Atletico advanced 4-2 on aggregate and will play Barcelona or Elche in the quarterfinals.

Torres stunned the Santiago Bernabeu by striking from Antoine Griezmann's pass seconds into the Spanish capital derby.

Sergio Ramos made it 1-1 soon after, but Atletico hung on in its area until Griezmann set up Torres for his second goal just after the halftime restart.

Cristiano Ronaldo leveled the score again in an otherwise subdued night he began by parading his Ballon d'Or trophy, leaving Real needing three more goals in 36 minutes to advance.

"Scoring so early set us on our way," Torres said. "I'm happy for our fans who have come, and for scoring my first two goals in my return at a ground I had never scored at."

Since losing last season's Champions League final to Real, the team managed by Diego Simeone has beaten its main rivals in the Spanish Super Cup, the league, and the Copa del Rey. It improved its record against Real to four wins, three draws, and three losses since it broke a 14-year, 25-match winless streak with a victory in the 2013 Copa del Rey final.

"We have eliminated the best team in the world," Simeone said.

Madrid continued to sputter with only one win in its last four matches since finishing 2014 on a Spanish record 22-win streak.

"We had worked out the formula last year, but not right now," Real coach Carlo Ancelotti said. "We will have a better strategy against (Atletico) next time."

Planet Futbol
How did national team captains, coaches, media vote for Ballon d'Or?

Hyped for a comeback, the Real faithful greeted Atletico's bus with a sea of raucous supporters that Spanish police had to part with officers on horseback.

The atmosphere inside was equally charged, but Atletico needed only 50 seconds to silence the crowd, except for its red-and-white contingent which exploded in rapture when Torres got his first goal in three games since returning to his boyhood club.

Siqueira intercepted Ramos' long ball, and three quick passes launched Griezmann on the break. He flew by Pepe and put his cross past Ramos for Torres to score a left-footed volley.

Real now needed four goals to go through, and it found its first in the 20th when Torres fouled Ronaldo, setting up Toni Kroos' free kick that Ramos headed in after goalkeeper Jan Oblak fell.

The hosts continued to bombard Atletico's area with crosses and long-range shots, as the defending league champions dug in until halftime.

The second half started with another erred pass by Ramos that Griezmann latched onto before dribbling into the box and laying off for Torres, who cut back to bring Pepe to his knees before squeezing the ball under goalie Keylor Navas to crush Real's hopes.

Ronaldo got his goal when he slipped around Diego Godin to nod in Gareth Bale's short cross.

Atletico, however, was in control the rest of the way, with Jorge "Koke" Resurreccion and substitute Arda Turan keeping possession as Real faded.

Atletico will probably face Barcelona in the final eight starting next week with the Catalan club visiting Elche late holding a 5-0 advantage.

SI Apps
We've Got Apps Too
Get expert analysis, unrivaled access, and the award-winning storytelling only SI can provide - from Peter King, Tom Verducci, Lee Jenkins, Seth Davis, and more - delivered straight to you, along with up-to-the-minute news and live scores.