South Africa defeated Zambia 3-2 in their second game in Group B to keep their 2023 African Nations Cup hopes of qualifying for the quarter-final alive.
The Amajimbos lost their group opener with a 2-0 defeat to Morocco while Zambia fell to a 1-0 loss to Nigeria.
Following their previous losses, both teams were looking to a win to save them from crashing out of the competition.
Vicky Mkhawana gave South Africa the lead in the 13th minute before he added the second on 31 minutes.
On the stroke of halftime Emmanuel Mwanza pulled a goal back for Zambia to make it 2-1.
Just three minutes into the second half Mwanza got his second goal to complete the comeback for Zambia.
But in the 76th minute Michael Dokunmu got the winner for South Africa.
In the group’s other game played earlier on Wednesday, Morocco pipped Nigeria 1-0 book their place in the quarter-finals.
On Saturday, South Africa will take on Nigeria in a winner takes all final group game with qualification to the last eight at stake.