The surprises created by Group E and F will see Morocco play Spain in the round of 16, Japan meet Croatia and Germany watch from home.
Groups E and F of the 2022 FIFA World Cup presented the biggest drama of the third round of group games yet, as underdogs Morocco and Japan surprisingly finished as firsts.
All eight teams from both groups originally went into the day with their fate in their hands to a large extent, but it was not to be for World number 2 Belgium, 11th-ranked Germany, Canada and Costa Rica as they bade the competition goodbye, in tears.
Here is a round-up of day 12 of the World Cup.
Canada 1-2 Morocco
In Doha, Morocco rounded off their group in the first half of their game with Canada, defeating the North Americans 2-1 at the Al Thumama Stadium to set up a round-of-16 clash with Group E runners-up Spain.
Despite knowing they needed at least a draw to make the knockout stages, Morocco started their game as early as the fourth minute, thanks to an Hakim Ziyech goal, and another nineteen minutes later with Youssef En-Nesyri putting himself on the scoresheet.
Canada did pull one back following an own goal by Nayef Aguerd, however, they found difficulty in finding another in the second half, leaving Morocco to grab their second win, and finish as group winners - becoming the first African side to do so since Nigeria in 1998.
Croatia 0-0 Belgium
In Al Rayyan, 2018 World Cup finalists Croatia did all they needed to do to secure passage to the round of 16 from Group F, securing a vital draw after playing 0-0 with Belgium.
For the Red Devils, Croatia's gain was their bane considering Japan defeated Canada in the other group game 25 kilometres away from the Ahmad bin Ali Stadium.
While Belgium will head home from Qatar, Croatia will progress to the round of 16 as group runners-up to face Group E winners Japan.
Costa Rica 2-4 Germany
In Al Khor, Germany survived a scare against Costa Rica but couldn't escape elimination from Group E, despite getting the needed result in a six-goal thriller at the Al Bayt Stadium.
The first half saw Germany go in front through Serge Gnabry, and in pole position to qualify. The second half, however, saw chaos as Costa Rica equalized and went in front through Yeltsin Tejeda and Manuel Neuer's own goal, before Kai Havertz's brace and Niclas Fullrug's winner secured the victory for the Europeans.
German hearts were, unfortunately, shattered at full-time as Japan had stunned and leapfrogged Spain on the league standings, with the Spaniards qualifying as runners-up based on goal difference.
Japan 2-1 Spain
The second game of the day in Al Rayyan saw Japan - like they did in their first group game - come from behind to secure a vital win over Spain.
Despite falling behind early at the Khalifa International Stadium following a goal from Alvaro Morata, the Asian giants produced a mind-blowing second-half performance, scoring twice in the space of three minutes thanks to Ritsu Doan and Ao Tanaka.
They then spent the rest of the half keeping Spain at bay and ensuring they qualified at the expense of Germany who exit the World Cup first round for the second time in a row.