Niger have qualified for their maiden Africa Cup of Nations final despite losing 3-0 in Egypt on Saturday.
Group G rivals
would have qualified had either won in Nelspruit but it ended
Nonetheless, the Bafana Bafana squad celebrated their victory in the errant belief that they had qualified.
Niger, South Africa and Sierra Leone all ended with nine points, but Niger qualify thanks to their superior head-to-head record against their rivals.
2012 NATIONS CUP RULES
In case of equality of points between
two or more teams
, after all the group matches, the ranking of the teams shall be established according to the following criteria:
14.1 Greater number of points obtained in the matches between the concerned teams
qualify after taking six points from their matches involving South Africa and Sierra Leone, while the latter duo could only tally five
"Niger have qualified," Confederation of African Football secretary-general Hicham El Amrani confirmed to BBC Sport.
South African joy in Nelspruit and around the country turned to despair after the realisation that they could not qualify as a best runner-up either.
Bafana players even went on a lap of honour after the final whistle, dancing in formation in front of cheering fans while coach Pitso Mosimane hugged members of his technical team.
Captain Siphiwe Tshabalala had two opportunities to put the hosts ahead but shot wide in the 62nd minute before Sierra Leone goalkeeper Christian Caulker pushed a late free-kick away.
In between, South Africa goalkeeper Itumeleng Khune tipped Sheriff Suma's shot over the bar to preserve a draw.
Few would have predicted that Niger would qualify from Group G when the draw for the 2012 Nations Cup was made.
Their opening 2-0 defeat in South Africa seemed to confirm this, but the Mena sent shockwaves across the continent when beating reigning African champions Egypt 1-0 in their second game.
In fact, their qualification was entirely based upon their results at home - which produced three wins out of three.
This resulted in their total tally of nine points, for they never managed to avoid defeat on their travels.