Host nation the Moroccan side overcame a nervy start to overcome their island opponents in the competition's first match on Sunday, thanks to Brahim Díaz and substitute El Kaabi in the second half.
It was a less than dominant display, though, from the strongly favored hosts, who are ranked 97 places above the small island nation in the world rankings and had to toil hard for the points in rainy conditions at Rabat's national stadium.
Morocco failed to convert an first-half spot-kick and were locked at 0-0 at half-time despite controlling the ball, finally opening the scoring in the 55th minute.
The goal came when full-back Mazraoui did well to prevent the ball from going out before laying it square for Brahim Díaz to sidefoot into the net.
Every first match is always difficult but we came good in the second half,” said Morocco coach Walid Regragui.
The tension was subsequently calmed by a piece of pure genius from Ayoub El Kaabi. Just 10 minutes after his introduction, the striker met a ball into the box with a spectacular overhead kick in the 74th minute, making it two and sealing the result.
Before that, the hosts could have been the lead in the 11th minute after a spot-kick was awarded for a challenge on Brahim Díaz. Yet, Rahimi's penalty was saved by Comoros goalkeeper Yannick Pandor.
The underdogs comfortably held their more illustrious opponents at bay before the hosts' greater quality in the end made the difference.
Goalkeeper Yannick Pandor made several further fine saves to keep down the scoreline as the match progressed, although Comoros created a chance for an equaliser shortly following Díaz's goal, with Saïd shooting straight at keeper Bounou.
The three points was somewhat overshadowed by an injury to Morocco's skipper, Saïss, who limped off in the first half apparently in tears.
This centre-back had just made his comeback to the international setup last month after a lengthy layoff due to ankle surgery.
The win extends Morocco's record-breaking run of successive wins to 19, surpassing the old best of 15 set by Spain from 2008 and 2009.
Elara is a tech enthusiast and writer with over a decade of experience in digital innovation and AI development.