Real Madrid star Brahim Diaz was left unmarked near the penalty spot to sweep home following Manchester United full back Noussair Mazraoui's low ball across the box.
The Real Madrid man's strike was greeted by a loud roar by the majority of the 60,180 in attendance at the Prince Moulay Abdellah Stadium and the game then sparked into life as Comoros forward Rafiki Said was denied by the legs of Yassine Bounou and Mazraoui saw a fine effort palmed away by Pandor.
Substitute Ayoub El Kaabi netted a sensational overhead kick with a quarter of an hour remaining to make the game safe for the North Africans and ensure that Walid Regragui's side lived up to pre-match expectations by delivering victory.