Morocco secured a place in the last 16 of the Africa Cup of Nations on Friday after goals by Selim Amallah and Zakaria Aboukhlal gave them a 2-0 win over the Comoros in Yaounde.
The Atlas Lions might have won by a greater margin without some heroics from Comoros goalkeeper Salim Ben Boina, who notably saved Youssef En-Nesyri's late penalty.
Morocco, whose only AFCON title dates back to 1976, had already beaten Ghana 1-0 in their opening game at the tournament and are now certain to advance to the knockout stages from Group C.
Vahid Halilhodzic's team went in front in the 16th minute when the Belgian-born Standard Liege midfielder Amallah scored after the Comoros defence struggled to clear their lines following a low cross into the box by Achraf Hakimi.
Morocco could have doubled their lead before the break but centre-back Nayef Aguerd saw a header from a corner crash back down off the underside of the crossbar.
Boina, who plays in the French lower leagues, then excelled in the second half, saving from a Hakimi free-kick and then producing a remarkable quadruple save on his line, with Adam Masina denied twice in the same move.
The goalkeeper gave away a penalty for crashing into substitute Aboukhlal but redeemed himself by saving En-Nesyri's spot-kick with seven minutes left.
However, Morocco sealed the win in the 89th minute when the Dutch-born Aboukhlal, of AZ Alkmaar, slotted in after being set up by Amallah.
The Comoros, the island nation in the Indian Ocean, are still looking for their first goal and point at their first ever Cup of Nations after losing 1-0 to Gabon in their opening match.
Gabon and Ghana meet in the other Group C game later.
Meanwhile, Frank Mhango scored twice as Malawi came from behind to defeat Zimbabwe 2-1 on Friday in the Africa Cup of Nations and keep alive their hopes of reaching the second round for the first time.
The forward from South African club Orlando Pirates netted in each half after Ishmael Wadi had put Zimbabwe ahead in a lively Group B match in Bafoussam.
Mhango recently returned to action after a lengthy injury layoff and became only the third player after Cameroonians Vincent Aboubakar (twice) and Karl Toko Ekambi to bag a brace so far in this Cup of Nations.
Guinea and Senegal share the Group B lead with four points each after two rounds of matches, Malawi have three and Zimbabwe are pointless.
Group winners and runners-up qualify automatically for the round of 16, along with the best four third-placed teams.
On Tuesday, Malawi face 2019 runners-up Senegal in Bafoussam while Guinea meet Zimbabwe in the Cameroonian capital, Yaounde.
After the presence of Liverpool duo Sadio Mane and Naby Keita in the first half of a double-header - a 0-0 draw between Senegal and Guinea - there were no instantly recognisable Malawi or Zimbabwe stars.
Malawi began with five local players, five based in South Africa and one in Mozambique while Zimbabwe had in forward Tino Kadewere from French club Lyon the only starter from a top-five European league.
After a slow start at the 20 000-capacity Stade Omnisport in the western Cameroon highlands, the game burst into life as half-time approached.
Zimbabwe went ahead on 38 minutes when an Onismor Bhasera cross allowed Wadi to score with a perfectly placed looping header that just eluded the outstretched hand of goalkeeper Ernest Kakhobwe.
The advantage lasted just five minutes, however, before another cross from the left flank, this time by Francisco Madinga, produced a goal with Mhango poking the ball into the net from close range.
Malawi, who lost injured captain and defender Limbikani Mzava just before the half-hour, left the field at half-time the happier team having survived several scares.
Gerald Takwara and Wadi wasted good close-range chances to break the deadlock in the latest episode of a southern Africa rivalry previously dominated by Zimbabwe.
Mhango struck again on 58 minutes to edge the Flames in front, taking advantage of defensive hesitancy by Teenage Hadebe to push the ball past goalkeeper Petros Mhari.