Atletico Madrid crashed out of the Copa del Rey to Girona on Wednesday following a highly entertaining 3-3 draw at home to the Catalan side, who sneaked through to the quarterfinals on away goals after the tie finished 4-4 on aggregate.
Atletico substitute Antoine Griezmann looked to have completed a late turnaround for Diego Simeone's side, who were trailing 2-1 in the second half, when he put the hosts 3-2 up in the 84th minute.
Yet Girona forward Seydou Doumbia delivered a final twist in the saga by scoring at the other end four minutes later.
Croatian forward Nikola Kalinic had fired Atletico into an early lead but the packed Wanda Metropolitano stadium was stunned into silence by a jaw-dropping volley from Girona winger Valery Fernandez in the 36th minute.
Atletico, already missing several first-team regulars to injury, lost Spain midfielder Saul Niguez to a muscle problem early in the second half.
They suffered another setback soon after when Cristhian Stuani headed Girona in front following a free kick, sparking furious but futile protests from Atletico, who claimed the Uruguayan had fouled their captain Diego Godin.
Griezmann came off the bench on the hour mark and soon threaded a pass towards Kalinic which Argentine winger Angel Correa squeezed under Girona's goalkeeper to equalise.
Godin then hit the crossbar and Santiago Arias had a goal ruled out for offside as Atletico chased a winner.
France forward Griezmann prompted wild celebrations when he smashed into the roof of the net, but the mood was soon punctured by Doumbia, also a substitute, who poked home a shot from Borja Garcia to send Girona through and dump out Atletico, who have not won the Copa del Rey since 2013.
"It's a magnificent achievement for the club to reach the quarter-finals and to knock out a team like Atletico, it fills us with satisfaction," said Girona coach Eusebio Sacristan.
"We kept overcoming difficulties, we put everything into this game to get this reward. This will give us a huge emotional boost and we hope to make the most of it in the next few games."
Atletico coach Diego Simeone added: "It was a wonderful game, a classic cup tie which we were always looking to win.
"We got the early goal and should have increased our advantage but Girona took their chances. We gave everything and sometimes you play well without qualifying, but I would always prefer to have played badly yet reach the next round."