Two first-half goals set Morocco on their way to top place in the ongoing 2022 World Cup Group F but they had to hold on for a 2-1 win over Canada at the Al Thumama Stadium on Thursday.
This was after conceding an own goal that kept them nervous throughout the second half.
Morocco finished on seven points, two more than runners-up Croatia, to advance from the group stage of the tournament to the next for a second time, 36 years after they became the first African country to do so at the Mexico World Cup in 1986.
A goalkeeping howler allowed Hakim Ziyech to score after four minutes, followed by a second in the 23rd minute from Youssef En-Nesyri, running onto a superb long pass from Achraf Hakimi.