Equatorial Guinea stunned Algeria to leave the defending champions on the brink of a group-stage exit from the Africa Cup of Nations in Cameroon.
Esteban Obiang slid in at the far post to convert a flick-on and net the only goal with 20 minutes left in Douala.
Algeria have just one point from their opening two games and must beat Ivory Coast in their final Group E game to have a chance of reaching the last 16.
The north Africans had two goals ruled out in what was a scrappy encounter.
The result ended Algeria’s unbeaten run at 35 matches, two short of Italy’s world record set last year, as they suffered their first defeat since October 2018.
Equatorial Guinea reached the Nations Cup semi-finals as hosts in 2015 but, having qualified for the tournament by right for the first time, this will go down as one of their biggest results in their history.
Juan Micha’s side move on to three points and are second in Group E, with Ivory Coast top on four points, Sierra Leone third on two and Algeria bottom on one.
The tight nature of the group will make Thursday’s final round of games fascinating, with the Equatoguineans facing the Leone Stars in Limbe at the same time as Algeria take on Ivory Coast in Douala (16:00 GMT).
Algeria were held to a goalless draw by Sierra Leone in their opening match and were once again frustrated in front of goal – this time by a side mostly comprised of players from clubs in the lower leagues in Spain.
Youcef Belaili had two attempts blocked by keeper Jesus Owono shortly before the Desert Foxes had the ball in the net for the first time midway through the first half.
Owono made a fine reaction save to keep out Riyad Mahrez’s header but Baghdad Bounedjah tapped in the rebound – only for an offside flag against Mahrez to cut Algeria’s celebrations short.
Equatorial Guinea then threatened, as Pablo Ganet had a low free-kick clawed away by Rais M’Bolhi and Iban Salvador sent a fierce strike flashing past Algeria’s right-hand upright.
Belaili had a shot deflected wide midway through the second half before Josete Miranda helped on Salvador’s corner for Obiang to convert for the shock winner.
No country has successfully defended the Nations Cup since Egypt in 2010, and once again questions will be raised about Algeria’s performance in sub-Saharan Africa, with two of their players citing the tropical climate as a factor in their opening stalemate.