Morocco defeated Canada to finish first in Group F and advance to the World Cup knockout stage for the first time in 36 years.
The Atlas Lions, who reached the last 16 for the first time in 1986, finished ahead of 2018 finalists Croatia, while Belgium, ranked second in the world, exited after finishing third in the group.
The next round will be a tough test against the team that finishes second in Group E, which could be Spain or Germany.
Morocco took the lead after only four minutes, thanks to a goalkeeping error by Milan Borjan. The Canada goalkeeper dashed out of his goal, but the ball was intercepted by Hakim Ziyech, who lofted a cool finish into an open net from 30 yards.
Youssef En-well-taken Nesyri’s goal doubled the north African side’s lead after he controlled Achraf Hakimi’s superb pass before firing in.
However, sloppy defending allowed Canada to re-enter the game when West Ham’s Nayef Aguerd stuck a boot out to divert the ball into his own net – the 100th goal of the World Cup.
Morocco were content to sit back and soak up pressure in the second period, knowing that if they avoided defeat, they would advance.
However, Atiba Hutchinson came close with a header that rattled the crossbar and dropped to the line as Canada’s campaign came to an end without a point.
Morocco did not win a game in the previous World Cup in Russia, but they have turned up the heat this time, becoming the second African team to advance after Senegal.
Morocco manager Walid Regragui has assembled a squad brimming with big-game experience.
Chelsea’s Ziyech, who has struggled for his club, has found form for his country and scored the opening goal, which was set up by Borjan.
Hakimi and En-Nesyri, a regular in the Champions League, combined for the second goal, with the Sevilla player latching on to the PSG full-pinpoint back’s pass before smashing in.
He had a chance for a second, but his stunning volley was called back for offside.
Morocco had kept a clean sheet in six matches prior to the game, five of them under Regragui, but that record was broken when Aguerd poked into his own net before halftime.