The Germans were the reigning champions when they crashed out in the first round four years ago in Russia and they were eliminated in repeat fashion in Qatar despite beating Costa Rica 4-2.
|Japan's players react after the Qatar 2022 World Cup Group E football match between Japan and Spain at the Khalifa International Stadium in Doha on December 1, 2022. Anne-Christine POUJOULAT / AFP |
Germany fell behind after Serge Gnabry's opener and despite two goals from Kai Havertz and a late strike from Niclas Fuellkrug, the four-time champions finished third in Group E behind Spain on goal difference.
"It is unbelievably bitter for us because our result would have been enough," forward Thomas Mueller said.
"It's a feeling of powerlessness."
Japan surprisingly advanced in first place with six points after coming from behind to topple Spain.
Alvaro Morata headed Spain in front early on, but Japan dramatically hit 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 in a shock opening win over Germany.
Tanaka's goal was highly controversial after the officials relied on VAR to decide Kaoru Mitoma had kept the ball in play by the finest of margins to set him up.
Japan will play Croatia, the beaten finalists in 2018, in the next round while Spain go on to face Morocco.
It is the fourth time Japan have reached the last 16 but they have never progressed beyond that stage.
"The players are showing us a different and new view of being able to fight on the world stage," said Japan coach Hajime Moriyasu.
"I would like to set a new record of the last eight or better."
Germany's top-selling daily Bild offered a scathing assessment of the team's latest failure.
The Germans were also knocked out in the last 16 at Euro 2020. "How embarrassing! We are out," read its headline. "Three tournaments in a row in which we didn't get anything done.
"The football world used to tremble before us. We were praised as a 'tournament team'. Now Germany is just a football dwarf."
- Belgium bundled out -
Second-ranked Belgium were also sent packing after a goalless draw with Croatia.
Belgium's exit was painful, with their players slumping to the turf after substitute Romelu Lukaku failed to capitalise on a string of gilt-edged chances.
Instead it was Luka Modric's Croatia who celebrated, qualifying for the knockout stage as the second-placed team in Group F, with five points.
Morocco beat Canada 2-1 to top the group with seven points, reaching the last 16 for the first time in 36 years.
The Belgians, knowing victory would take them through, poured forward in the second half in frantic search of a winner but fell agonisingly short.
Lukaku smashed the ball against the post around the hour mark and squandered other chances to the disbelief of Belgium's fans.
With just moments remaining he seemed certain to score from close range but could only chest the ball into the arms of Croatia goalkeeper Dominik Livakovic.
The 2018 semi-finalists head home after an embarrassing campaign in which they scored just one goal.
Belgium have had a miserable stay in Doha with rumours of in-fighting and a number of the country's "Golden Generation" including Kevin De Bruyne, Eden Hazard and Thibaut Courtois may have played on the biggest stage for the final time.
- Martinez steps down -
In the aftermath of their exit, Belgium coach Roberto Martinez announced he was leaving his job.
"That was my last game with the national team, I can't carry on," Martinez said. "It's the time for me to accept that this is the last game."
Morocco made it through to the knockout stage for the first time since 1986, thanks to first-half goals from Chelsea star Hakim Ziyech and Youssef En-Nesyri.
Canada, already eliminated before the final round of group games, cut the deficit through an own goal but Morocco held on to win.
"It wasn't easy, but when you have an opportunity to make history, you remember it," said coach Walid Regragui.
"We've made lots of people happy this evening, but let's not stop here."
| ||Cameroon fight back to draw World Cup thriller with Serbia |
Cameroon kept their hopes of making the last 16 of the World Cup alive on Monday after fighting back from two goals down to draw a thrilling Group G encounter with Serbia 3-3.
| ||Ghana 'not looking back' as Uruguay World Cup grudge match looms |
Ghana say they will not be focused on the pain of their bitter 2010 quarter-final defeat when they face Uruguay once more at the World Cup on Friday.
| ||Brazil, Portugal join France in World Cup knockouts |
Five-time champions Brazil and Cristiano Ronaldo's Portugal joined France in the World Cup knockout rounds with a game to spare on a dramatic day of action in Qatar on Monday.