For the first time in 36 years, Morocco advanced to the World Cup knockout stage by narrowly defeating Canada to win Group F.
The Atlas Lions, who last advanced to the round of 16 in 1986, finished ahead of Croatia, who won the tournament in 2018, while second-ranked Belgium was eliminated after taking third place in the group.
The team that finishes second in Group E, which may or may not be Spain or Germany, will present a challenging test in the next round.
Four minutes into the game, Morocco took the lead thanks to a goalkeeping error from Milan Borjan.
The Canadian goalkeeper dashed from his position but sent the ball directly to Ziyech, who lofted a calm shot from 30 yards into the open goal.
Youssef En-well-placed Nesyri’s goal, which he scored after controlling an excellent pass from Achraf Hakimi, allowed the north African team to increase their lead.
The 100th goal of this World Cup was scored by West Ham’s Nayef Aguerd, who diverted the ball into his own goal as a result of shoddy defence by Canada.
Morocco was content to take a backseat in the second quarter and absorb the pressure since they knew that if they avoided defeat, they would advance.
However, Canada’s campaign came to an end without a point after Atiba Hutchinson’s header rattled the crossbar and fell onto the line.