Bafana Bafana has paid the price last night after Tokelo Rantie missed a penalty, wasting a great chance to double the score but instead hit the crossbar.
To make matters worse, Thulani Hlatshwayo committed an own-goal that levelled the scores to one-all.
Algeria started with 11 of the squad that reached the second round of the 2014 World Cup in Brazil and forced eventual champions Germany into extra time before bowing out.
South Africa had to do without suspended defensive colossus Erick Mathoho with Rivaldo Coetzee and Hlatshwayo manning the central positions.
Captain Dean Furman came agonisingly close to ending the stalemate midway through the opening half by unleashing an explosive shot from outside the box.
Goalkeeper Rais Mbolhi got the slightest of touches to the rising, swerving shot and it proved crucial as the ball cannoned back into play off the crossbar.
Mbolhi twice rescued the Foxes as half-time approached, dispossessing Sibusiso Vilakazi and then blocking an Andile Jali shot with his leg.
A Rantie back-heel set up Phala to break the deadlock on 51 minutes with a close-range shot wide of Mbolhi.
Then a Rantie spot-kick flew over off the crossbar after Aissa Mandi fouled Vilakazi.
Back came Algeria and Slimani was denied by Keet and then by the post.
However, the North Africans scored twice within six minutes midway through the second half to turn the tide.
Final score: Bafana Bafana 1 Algeria 3.