South Africa battled out a goalless draw with Niger while Algeria came from behind to hold Guinea 1-1 to throw wide open Group C ahead of the final matches.
Algeria were staring at defeat and elimination against hard-fighting Guinea when MC Alger star Sofiane Bayazid salvaged the point for the 2023 losing finalists.
Ismael Camara had put Guinea into a 62nd minute lead after combining with Alhassane Bangoura.
Bangoura, who scored Guinea's winning goal against Niger in the opening match, came close with his own attempt shortly after, but his final effort lacked the punch.
‘Not meant to be’
Bayazid then levelled with two minutes remaining to double his goal tally and salvage the point for the Desert Foxes who need to win the last match to progress.
South Africa coach Molefi Ntseki said he could not fault his players after the expected draw with Niger.
“I think that South Africa did their best in trying to win this game. But it was not meant to be, and we move forward,” Ntseki said.
Algeria and South Africa are now tied on five points - a point behind leaders Uganda going into the final group matches on August 18.
Algeria will travel to Nairobi to play Niger who have only collected one from three matches while the tournament co-hosts, Uganda face South Africa in Kampala.