Two late penalties dealt gallant Bafana Bafana a huge blow as they were knocked out of the African Nations Championship (Chan).
The spot kicks earned the hosts Uganda a 3-3 draw at the Mandela National Stadium in Kampala on Monday night.
Ramahlwe Mphahlele, Thabiso Kutumela and Phillip Ndlondlo's second-half goals seemed enough to book Bafana a quarterfinal spot in the tournament as they gave them a 3-1 lead with only seven minutes remaining.
But late penalties scored by Allan Okello (88 minute) and Rogers Torach (90+6 minutes) gave the Cranes huge relief as they kept them in the tournament they're co-hosting with Kenya and Tanzania.
The Cranes needed a draw to avoid bombing out of the tournament after starting this match on top of Group C with six points while Bafana and Algeria were trailing them with five.
In the end Uganda finished on top with seven points and proceed to the next round alongside Algeria, who played 0-0 draw against Niger in their final match in Kenya, also on Monday night.
Though Bafana were level on six points with Algeria, they were knocked out on goal difference.
Ntseki's team avoided defeats in all their four group matches as they won one and drew three.
It will, however, be this draw that Bafana needed to avoid the most.
They looked on course to do just that when Ndlondlo's beauty gave them a 3-1 lead in the 83rd minute.
Bafana had to defend with their lives after Uganda reduced the score to 3-2 following a penalty that was scored by Allan Okello after Kegan Johannes had committed a foul inside the area.
In added time Menzi Masuku handled the ball inside the area, and Uganda skipper Torach made no mistake as he beat Samukelo Xulu with a low strike much to the delight of the home crowd who had packed the venue to capacity.
Despite not having much possession in the first half the Cranes managed to find an opener in the 31st minute when they caught Bafana on the break leading to Patrick Kakande to supply goal scorer Jude Ssemugabi with a telling assist.
After the restart Bafana took advantage of Uganda, who suddenly sat back in an attempt to defend their lead.
Bafana's first two goals came from the right flank. They first had a free kick taken by skipper Neo Maema and finished off by defender Mphahlele, who was provided with an assist by fellow centre back Kwanda Mngonyama in the 53rd minute.
It only took six more minutes for Bafana to take the lead for the first time in this game. This time Wayde Jooste's quick throw was finished off by Thabiso Kutumela, who completed the tournament as South Africa's top scorer with three goals.
Despite the result, this performance alone will surely boost the chances of Bafana players who came to this tournament unattached to any club. Most will have some deals sealed with new clubs before the PSL window shuts on September 22.