As the few supporters present at the Stade de la Reunification were beginning to pack up, Raja Casablanca playmaker Abdelilah Hafidi, who played his first game in more than six weeks due to injury, scored the fifth goal for Morocco.
Morocco will face either Guinea, Zambia, or Tanzania in the quarter-final.