Spain have qualified for last 16 of the 2022 World Cup on Thursday despite a 2-1 defeat by Japan.
The Japanese remarkably won Group E on a rollercoaster night which saw four-time champions Germany eliminated.
Japan secured another incredible triumph after beating Germany in their opening game, with their progression from the “group of death” one of the greatest achievements in the country’s footballing history.
For a few heart-stopping minutes Spain were poised to head out when Costa Rica were leading in the other game, but the 2010 champions squeezed through after Germany did them a favour by coming back to beat Los Ticos.
Spain and Germany ended on four points each, but La Roja progressed on goal difference.
Alvaro Morata sent Spain ahead early on with a towering header, but Japan dramatically struck back at the start of the second half.
Ritsu Doan and Ao Tanaka’s goals saw them mount a sensational comeback, just as they did against Germany.
Tanaka’s goal was highly controversial after the officials relied on VAR to decide Kaoru Mitoma had kept the ball in play by a hair’s breadth to set him up.
Spain struggled to create chances against a staunch Japanese defence in the final stages, with the Asian side aware that conceding another goal would see them eliminated.
Japanese players collapsed at full-time in celebration, exhausted and elated, while the substitutes raced on to celebrate.
Spain face Morocco in the last 16, while Japan play Croatia.