Amajombos stunned defending champions Zambia with a 2-1 win on Tuesday to advance as Group B winners and at the same time send the Young Chipolopolo home after the first round.
South Africa came back from the shock of conceding an early goal to claim victory over Zambia and top the pool with seven points.
Vincent Kalinda had Zambia in the lead, but just minutes later Thando Buthelezi equalised for Molefi Ntseki’s charges, with his second goal of the campaign.
Zambia had to push for the win to overhaul the Amajimbos at the top of the table, but were caught 10 minutes from time when Boitumelo Radiopane found a winner for the two-time champions.
South Africa will now await the best runner-up in the semifinals.
Namibia topped Group A with a 2-0 victory over Botswana thanks to goals from Prins Tjiueza and Gonzales Tsuseb. For the former it was a fifth strike of the tournament that sees him lead the charge for the Golden Boot.
In Group A Mauritius kept their knockout hopes alive with a thumping 6-1 victory over fellow islanders Seychelles, despite going behind in the game.
Jarrel Suzette smashed an excellent free-kick for Seychelles, but Mauritius fought back as David Aristide picked up a brace to go with strikes from Jean Gentil, Louis Philibert, Ian Genave and an own goal from Adrian Hoareau.
That win for took them to six points in the pool, level with Namibia and Botswana.
As pool positions are determined on head-to-head when teams are level on points, it meant that a mini-league was created with only the results of matches involving the trio considered for the calculation.
The three were still level on three points, but Namibia had a +1 goal-difference to head the pool, followed by Mauritius and then Botswana.
They advance to meet Group C winners Angola in the semifinals on Friday as they seek to regain the title they won in 2016.
All is not lost for Mauritius though as they attempt to finish as the best runner-up. Their overall goal-difference of +5 is strong, but they must wait to see the outcome of Wednesday’s Group C clash between Swaziland and Malawi.
The latter, with a goal-difference of +4, are the only realistic challengers to Mauritius, but they must claim a victory, leaving the hosts to hope for a draw or a Swaziland win.
Namibia 2 (Prins Tjiueza, Gonzales Tsuseb) Botswana 0
Seychelles 1 (Jarrel Suzette) Mauritius 6 (Jean Gentil, David Aristide 2, Louis Philibert, Ian Genave, Adrian Hoareau og)
Lesotho 1 (Kananelo Rapuleng) Mozambique 2 (Pablo Becherdas, José Zavala)
South Africa 2 (Thando Buthelezi, Boitumelo Radiopane) Zambia 1 (Vincent Kalinda)
Swaziland vs Malawi (KO 15h30 local, 11h30 GMT) – Stade Anjalay
Zimbabwe vs Angola (KO 15h30 local, 11h30 GMT) – Stade St Francois Xavier
*Standings are decided on a head-to-head basis in the first instance
Group A P W D L GF GA Pts
Namibia (Q) 3 2 0 1 10 4 6
Mauritius 3 2 0 1 7 2 6
Botswana 3 2 0 1 3 3 6
Seychelles 3 0 0 3 5 16 0
Group B P W D L GF GA Pts
South Africa (Q) 3 2 1 0 6 2 7
Zambia 3 1 1 1 2 2 4
Mozambique 3 1 1 1 3 5 4
Lesotho 3 0 1 2 1 3 1
Group C P W D L GF GA Pts
Angola (Q) 2 2 0 0 5 0 6
Swaziland 2 1 0 1 3 6 3
Malawi 2 1 0 1 5 1 3
Zimbabwe 2 0 0 2 2 8 0
Matches Played: 16
Goals scored: 52
Biggest victory: Namibia 8 Seychelles 3 (Group A, July 19); Seychelles 1 Mauritius 6 (Group A, July 24); Malawi 5 Zimbabwe 0 (Group C, July 23)
Most goals in a game: 11 – Namibia 8 Seychelles 3 (Group A, July 19)
5 goals – Prins Tjiueza (Namibia)
3 – Tyrin George (Namibia)
2 – David Aristide (Mauritius), Pablo Bechardas (Mozambique), Thando Buthelezi (South Africa), Zito Luvumbo (Angola), Oageng Maphorisa (Botswana), Patrick Mwaungulu (Malawi), Rino Pauline (Seychelles), Bandile Shabangu (Swaziland), Jarrel Suzette (Seychelles)
1 – Afandi Aboudou (Seychelles), Domingos Andrade (Angola), Mthokozisi Balakasi (South Africa), John Bonomali (Zimbabwe), Jose Cabingano (Angola), Langelihle Dlamini (Swaziland), Ian Genave (Mauritius), Jean Gentil (Mauritius), Vincent Kalinda (Zambia), Edmar Kamatuka (Namibia), Jeremy Kawoa (Mauritius), Tebogo Kopelang (Botswana), Tatenda Mbalaka (Malawi), Emmanuel Mitole (Malawi), Francis Mtoso (Malawi), Motlhalosi Nare (South Africa), Netinho (Angola), Thandolwenkosi Ngwenya (Zimbabwe), Louis Philibert (Mauritius), Boitumelo Radiopane (South Africa), Kananelo Rapuleng (Lesotho), Benson Simwanda (Zambia), Bongolwethu Siyasi (South Africa), Gonzales Tsuseb (Namibia), José Zavala (Mozambique)
Own goal – Adrian Hoareau (Seychelles)