Japan 2-1 Spain: Samurai Blue top Group E after remarkable fightback
Goals from Ritsu Doan and Ao Tanaka helped Japan reach the World Cup last 16 as Group E winners with a remarkable 2-1 victory over Spain, with La Roja joining them as Germany were dumped out.
With both sides knowing a win would see them advance, Spain wasted little time in hitting the front as Alvaro Morata headed beyond Shuichi Gonda for his third goal of the tournament early on.
However, Spain failed to capitalise on their huge dominance of possession as Japan turned the game on its head with a quickfire second-half double, Doan firing home from range before Tanaka bundled in a second.
Spain were briefly on their way out of the World Cup when Costa Rica took the lead against Germany in the group's other fixture.
But Germany's late comeback in a 4-2 win ensured La Roja survived an incredible finale to go through as runners-up.
Junya Ito shot into the side netting after Sergio Busquets' early error, and Japan were punished for that miss when Morata nodded Cesar Azpilicueta's pinpoint cross home after 11 minutes.
Dani Olmo and Nico Williams saw efforts blocked as Spain kept Japan at arm's length in a comfortable opening half, though Luis Enrique's side themselves struggled to create further chances.
However, Japan substitute Doan needed just three minutes to make an impact after his half-time introduction, lashing a ferocious 20-yard strike beyond Unai Simon to level the match.
Japan completed a remarkable turnaround just three minutes later as Tanaka bundled home Kaoru Mitoma's cross, with a drawn-out VAR review ruling the Brighton and Hove Albion man kept the ball in play.
Gonda denied Marco Asensio and Olmo in quick succession as Spain spent the remainder of the game camped in Japan's half but Hajime Moriyasu's men produced a resolute performance to cling on, beating two previous World Cup winners to first place in memorable fashion.
What does it mean? Comeback kings repeat the trick
Supporters of Japan could have been forgiven for believing their side had squandered the opportunity to escape Group E when they followed up their 2-1 win over Germany by losing to Costa Rica.
However, Japan produced an even more astonishing fightback to seal their progress and became just the third team in World Cup history to win two different games after trailing at half-time at a single tournament, after Brazil in 1938 and West Germany in 1970.
Spain, meanwhile, will face Group F winners Morocco after seeing their seven-game World Cup unbeaten run halted and they will have to improve after a dire second half.
Substitute strikes again for Samurai Blue
Freiburg attacker Doan instigated Japan's win over Germany by levelling the scores and he wasted little time in doing the same here after replacing Takefusa Kubo at the break.
His long-range strike ensured Japan had seen three consecutive World Cup goals scored by substitutes, though that run ended when Tanaka fired Japan ahead just 142 seconds later, amid debate over whether the ball had gone out of play in the build up.
Pass masters fall short
Spain were considered by many to have produced the best performances of any team in Qatar as they took four points from fixtures against Costa Rica and Germany but their free-flowing style was stifled effectively by the Samurai Blue, who were more effective and registered the greater xG (1.27 vs 1.12) despite seeing so little of the ball.
Japan recorded just 18 per cent possession against Spain, the lowest share of the ball registered by a winning team at the World Cup since those records began in 1966.
Key Opta Stats:
Japan have progressed to the knockout rounds in consecutive World Cup tournaments for the first time.
Spain have lost their final group-stage game (excluding second group stage) at the World Cup for the first time since 1982 (1-0 vs Northern Ireland), having won eight of their previous nine such games (D1).
Three of Japan's last four goals at the World Cup have been scored by substitutes, as many as they had scored via subs in their first 20 goals.
Morata scored his ninth goal in just 13 appearances at major tournaments for Spain (World Cup and Euros), only David Villa (13 in 16 apps) has scored more such goals.
He also became just the second player to score on his first three World Cup appearances for Spain, after Telmo Zarra in 1950, netting his 30th international goal against Japan (his 60th cap).
What's next?
As group winners, Japan will face Croatia in the round of 16 on Sunday, while Spain will take on Morocco at the Education City Stadium one day earlier.