South Africa progressed to the semi-finals of the 2014 African Women's Championships after a 5-1 victory over Algeria with Portia Modise scoring twice to take her tally of international goals to 100.
The margin of victory for Banyana Banyana meant Ghana failed to advance to the last four despite a 1-0 win over Cameroon who had already qualified from Group B.
It is a blow for the Black Queens who were hoping to make it to another Fifa Women's World Cup.
South Africa knew they had to score freely in order to take the second semi-final place on offer from the group.
Portia Modise came into the game on 98 international goals and missed the chance early on to go to number 99, after she missed a 17th minute penalty.
But South Africa maintained their composure and on 36 minutes they took the lead through Amanda Dlamini. Four minutes later, Modise did hit the back of the net to make it 2-0 going into half-time.
After the break, South Africa added a third on 70 minutes through Sarah Mollo with Mamello Makhabane hitting a fourth in the 82nd minute.
And just six minutes later came the goal South Africa had been waiting for as Portia Modise scored her 100th goal for Banyana Banyana to make it 5-0 and boost their goal-difference.
Algeria finished with a consolation goal in added-time through Naima Bouhani to make it 5-1 at full-time.
Afterwards, a jubilant Portia Modise told BBC Sport it was "a great feeling" to reach 100 international goals - a feat that only 12 women and one man (Iran's Ali Daei) had previously achieved.
"I slept on it yesterday, and I woke up being sure I would score those two goals - and I did, helping the team to go through to the next round. So for me, it's a great day."
It was a heart-breaking day for Ghana who also needed to win and score plenty of goals.
After a goal-less first half, Elizabeth Cudjoe gave the Black Queens hope of building up their goal difference when she scored in the 52nd minute.
But Ghana failed to capitalise on that, beating Cameroon 1-0 and missing out on a place in the last four.
South Africa will play the Group A winners Nigeria in the semi-finals with Group B winners Cameroon taking on Ivory Coast.