Canada had nothing but pride to play for while Morocco needed just a point to be guaranteed a place in the knockout stages for the first time since 1986.
Goals from Hakim Ziyech & Youssef En-Nesyri put Morocco 2-0 up in the first 23 minutes. Nayef Aguerd's unfortunate own goal in the 40th minute gave Canada an outside hope of getting something from the contest.
But Morocco held on to their advantage to top the group with seven points & become the second African nation to make it to the Round of 16.