Morocco hit back in the final seconds to equalize 1-1 against Cameroon at the Bayil Stadium in Baku in Thursday's action at the Islamic Solidarity Games football tournament.
A tap in from Frantz Pangop Tchidjui, following a speedy counter-attack, saw the Indomitable Lions take the lead only for defender Achraf Dari to bag a dramatic equalizer with just a couple seconds left to play.
The north Africans now have four points, two more than Cameroon ahead of the clash between Saudi Arabia and hosts Azerbaijan later in the day.
In the first half, Morocco had the best chances with a dangerous cross from Zakaria Belamachi testing goalkeeper Simon Loti Omossola Medjo and a long-range freekick rattling the crossbar a couple minutes later.
But Cameroon hit back to mount a counter-attack with skilled number 10 Pangop Tchidjui finishing off a deft move that involved midfield general Pierre Malong Kunde, currently on loan at lowly UD Extramadura from Atletico Madrid.
Cameroon could have added another goal if Jeff Nana Ngongang's ambitious attempt from midfield had been a couple centimeters more precise.
Morocco continued to pile on the pressure in the second half and were unlucky not to equalize when captain Aymane El Hassoun and Walid Sabbar failed to find the target, while Mohamed Kamal missed an easy chance inside the box.
The north Africans, who had edged Cameroon in their last two encounters, were denied a penalty when Kamal fell in the box after a collision with Ngongang Nana et Omossola Medjo with 25 minutes still to play.
Yves Daniel Kamy Ntankeu's dismissal, after two yellow cards, after 58 minutes didn't help the Cameroon cause and Morocco continued attacking.
Tempers flared in the dying minutes with a brawl inside the Cameroon box that ended with yellow cards for Morocco's Achraf Dari and Cameroon's Olivier Mbaissidara Mbaizo.
Cameroon held on to their lead until five minutes into added time when Dari jumped high above everyone to become the hero of the day for Morocco.
Monday's final action in the group stages sees Cameroon face Saudi Arabia while Azerbaijan host Morocco.