World Cup latest: Germany crashes out after Japan stuns Spain
Group F: Croatia 0-0 Belgium
Belgium, one of the pre-tournament favourites, crash out of the World Cup
A draw with Croatia and Morocco beating Canada sends Roberto Martínez's team home.
Croatia, semi-finalists in 2018, will play the winner of Group E -- which Spain led going into Thursday's matches -- in the last 16.
Group F: Canada 1-2 Morocco
Morocco win Group F after holding on to beat Canada.
Hakim Ziyech and Youssef En-Nesyri put Morocco 2-0 up.
But Nayef Aguerd's own goal shortly before half-time brought Canada back into the game.
Canada came agonisingly close to getting an equaliser when a header hit the bar and bounced down on the goal line in the closing stages of the second half.
Morocco will play the runners-up of Group E in the knockout phase of the World Cup.
Group E: Spain 1-2 Japan
Japan has won against Spain 2-1 following goals from SC Freiburg winger Doan Ritsu and Fortuna Düsseldorf midfielder Ao Tanaka.
Spain had kickstarted the match with an 11th minute goal from Atlético Madrid striker Álvaro Morata.
Spain had been the clear favourite to win Thursday's match against Japan, but so was Germany -- and that didn't end well for the European team.
Japan started the World Cup with a surprise 2-1 win over Germany but followed up with a 1-0 loss to Costa Rica.
Group E: Costa Rica 2-4 Germany
Four-time world champions Germany defeated Costa Rica 4-2, but have been eliminated from the World Cup.
The German team won the match following one goal from Bayern Munich winger Serge Gnabry, one from Werder Bremen forward Niclas Füllkrug and two from Chelsea player Kai Havertz.
Costa Rica scored two goals, one by Herediano player Yeltsin Tejeda and another by Millonarios defender Juan Pablo Vargas.