Algeria beat Senegal 3-2 on Friday to blow the 2010 World Cup and African Cup of Nations qualification race in Group Six wide open.
The Desert Foxes' hard-fought victory at home in Blida moved them to the summit with nine points, ensuring an exciting finale.
But it was the Teranga Lions who took the lead through Issiar Dia with his first international goal on 54 minutes.
But the home side rallied and drew level five minutes later when Yacine Bezzaz made the most of some poor defending from the visitors.
Further strikes from Rafik Saifi and Antar Yahia put Algeria in a comfortable lead but Mamadou Sougou's goal in injury time ensured a nervy finish.
The final whistle sent the home fans into raptures as the Desert Foxes moved to the top of the group.
The result leaves the group finely poised after Gambia thrashed Liberia 3-0 on Saturday to leapfrog Senegal into second place even though both sides have eight points.
Norway-based striker Njogu Demba scored two goals for the Scorpions that helped them to the victory at the Independence Stadium in Banjul.
The 29-year-old put the home side in the lead in 10th minute before Ousman Jallow extended their the advantage on the half hour mark.
Demba, who plays for SK Bann, put the game beyond doubt in the 80th minute with a strike from the edge of the box.
The results means all the countries in the group apart from Liberia have a chance of clinching the group's automatic ticket to the second phase of the qualifiers.
Gambia can qualify if they beat Senegal in Dakar next month but group leaders Algeria must drop points against Liberia before the Scorpions grab the automatic ticket.
Liberia are already out of contention as they have just two points with only one game left.
Bookmark with:
What are these?