MADRID (AP) -- Antoine Griezmann's late goal couldn't save Atletico Madrid as its defense faltered in a surprising elimination to Girona in the round of 16 of the Copa del Rey on Wednesday.
Real Madrid and Sevilla lost their matches but both had big first-leg leads and advanced to the tournament's quarterfinals.
Atletico's usually stout defense struggled in a 3-3 draw and allowed an 88th-minute equalizer that kept Diego Simeone's team from reaching the last eight for the first time since the coach took over in 2012. It was the first time Atletico conceded three goals at home since it moved to Wanda Metropolitano Stadium in 2017.
Griezmann came off the bench to score an 84th-minute goal that looked set to send Atletico to the quarterfinals, but substitute Seydou Doumbia netted four minutes later and Girona advanced on away goals after a 4-4 aggregate score. The teams drew 1-1 in the first leg last week.
"It was a classic Copa match," Simeone said. "Girona was very efficient with its chances and in the end it got the result it needed. We have to congratulate them."
Atletico won the Copa for the last time in 2013, and it had made it at least to the last eight every time since then.
Girona is in the quarterfinals for the first time.
"The players did an incredible job to send us through," Girona coach Eusebio Sacristan said. "It's very important for our club to be able to advance. We know the importance of the feat that we have achieved."
Atletico started well and striker Nikola Kalinic opened the scoring in the 12th with a close-range shot after a long pass from Diego Godin. Girona equalized through Valery Fernandez after the hosts couldn't clear a cross into the area in the 37th, and it took the lead with a header by striker Cristhian Stuani in the 59th to leave Atletico in need of two goals to advance.
Angel Correa got the first from inside the area in the 66th after being set up by Griezmann, and the French forward -- who entered the match in the 61st -- scored the second with an angled left-footed shot into the top of the net.
Atletico fans were still celebrating at the Metropolitano when Doumbia, who came off the bench in the 68th, redirected the ball into the net after a low shot by Borja Garcia.
Simeone was back on the bench for Atletico after serving a three-game suspension for a rant in a Copa match against Sevilla last season.
MADRID GOES THROUGH
Madrid advanced 3-1 on aggregate despite a 1-0 loss at Leganes, which played better and had most of the chances at Butarque Stadium.
Madrid goalkeeper Keylor Navas, one of the many second-stringers in the lineup, made several difficult saves to keep the hosts from scoring more goals.
The local crowd gave Leganes a standing ovation after the final whistle. It was the team's first home win ever against Madrid.
Leganes had eliminated the Spanish powerhouse in the quarterfinals of last year's Copa with a win at Santiago Bernabeu Stadium.
Newly signed striker Martin Braithwaite scored the game's lone goal in the 30th.
"We lost the match but advanced," midfielder Casemiro said. "We had it under control."
Sevilla, a Copa finalist in two of the last three seasons, advanced to the quarterfinals despite a 1-0 home loss to Athletic Bilbao. It had won the first leg 3-1 in Bilbao.
Gorka Guruzeta scored Athletic's winner in the 77th.
Four-time defending champion Barcelona hosts Levante on Thursday to try to reverse a 2-1 first-leg loss.