Algeria escaped a "catastrophic" start to their Africa Cup of Nations campaign, says coach Christian Gourcuff after Monday's win over South Africa.
Despite being one of the tournament favourites, they trailed after Thuso Phala's 51st minute goal.
Bournemouth's Tokelo Rantie then missed a penalty for Bafana Bafana before Algeria scored three goals in the final 23 minutes.
"The penalty was a turning point," said Gourcuff.
He added: " At 2-0 the game was not over but we would have been in a difficult situation."
Having impressed on their way to reaching the knockout stages in the World Cup in Brazil last summer, Algeria are tipped by many to go all the way in Equatorial Guinea.
But, after a disappointing first hour, it took Rantie's missed penalty and an own goal from Thulani Hlatshwayo to give them hope of the expected victory.
Goals from Faouzi Ghoulam and Islam Slimani then secured the win for the North Africans, who face Ghana next on Friday.
"It was an intense game and it could have been catastrophic," said Gourcuff, who replaced Vahid Halilhodzic after the World Cup finals last year.
"But things turn quickly in football and we played well to come back and win.
"It was a real test for the players on a pitch which does not allow you to keep the ball."