It leaves Riyad Mahrez and his side bottom of Group E after two rounds of fixtures and they will need a victory in their final game, which comes against group leaders Ivory Coast.
Esteban Obiang scored the only goal of the match, 20 minutes from time, to send his nation up into second with a fine chance of making the knock-outs.
Earlier, Sierra Leone made it two shock results from two group stage games after they twice came from behind to earn a 2-2 draw against Ivory Coast, one of the pre-tournament favourites at the 2021 Africa Cup of Nations.
After goals from former West Ham United striker Sebastian Haller and Arsenal’s Nicolas Pepe, the Elephants were just a minute away from confirming their place in the knock-out phase.
But a remarkable incident in stoppage time - in which the dry pitch played a huge part - turned the outcome around and briefly pushed Sierra Leone up to second in Group E, before Equatorial Guinea’s win over Algeria.
Goalkeeper Badra Sangare raced from his goal to grasp the ball out toward the right-hand edge of his six-yard box, only to land awkwardly in the turf, leaving him with an injured knee and unable to move. The ball squirmed out of his gloves and bounced back into play, with former Tottenham, QPR and Liverpool defender Steven Caulker in place to square for Alhaji Kamara to bundle in, in the 93rd minute.
Amid the joyous celebrations for one of the tournament’s rank outsiders, who remain unbeaten after stifling Algeria last time out, Ivory Coast had to play out stoppage time with former Spurs right-back Serge Aurier in goal, with Sangare stretchered off.
That was itself a concern for Ivory Coast, as he is their second-choice goalkeeper - they named first-choice Sylvain Gbohouo in the squad, but his drugs ban handed down by Fifa has been upheld and he will play no part at the Afcon either.
Elsewhere, in Group F Tunisia put themselves back in the running for the knock-out stage with a 4-0 thrashing of Mauritania. They are only the third side to net three or more in a game at the tournament so far, and the first to record a four-goal margin of victory.
Midfielder Wahbi Khazri, formerly of Sunderland, scored twice in between Hamza Mathlouthi’s opener and Seifeddine Jaziri’s clincher.
There was late drama in the group’s other fixture, as Gambia and Mali drew 1-1 to leave both teams on four points in first and second place. Both goals came from the penalty spot in the closing 11 minutes of the match, Ibrahima Kone netting for Mali before a stoppage-time equaliser Musa Barrow earned a share of the spoils.