Selim Amallah and Soufiane Chakla scored on either half to secure Morocco a hard fought 2-0 win over Comoros in Group C.
Midfielder Amallah broke the deadlock on 16 minutes with sumptuous close range past the brilliant Comoros keeper Salime Boina.
Boina saved a late Youssef En-Nesyri penalty keep his side the game before substitute Zakaria Aboukhlal secured the victory with a stoppage time goal book the Atlas Lions place in the knockout stage.
Morocco dominated the match but struggled to find a way past the brilliant Comoros keeper Boina.
Soufiane Boufal provided Morocco width on the right and the winger came close on numerous occasions but Comoros defended well.
PSG defender Hakimi placed in a brilliant low cross into the Comoros box which was not dealt with giving Amallah the time and space to fire in the opening goal.
Defender Nayef Aguerd saw his glancing header came of the woodwork whiles Ayoub El Kaabi missed a sitter.
The striker was played through on goal only lose his footing while rounding the keeper which allowed the islanders to clear their lines.
Morocco continued to dominate while Comoros play on the counter. Boina denied Boufal with a instinctive save inside the six yards before pushing away Hakimi’s goal bound free kick to the frustration of Vahid Halilhodzic who made changes late on as they look for the second goal.
Substitute En-Nesyri missed a late penalty before Boina pulled another save to deny him from doubling Morocco’s lead.
Zakaria Aboukhlal scored the winner with a calm finish to send Morocco to the knockout stage with a game to spare.