Hildah Magaia scored nine minutes into added time to salvage a 2-2 draw for South Africa against Ivory Coast on Friday in the Women's Africa Cup of Nations in Morocco.
The Ivorians led 2-0 at half-time in the Group B match thanks to a brace from 18-year-old Grace Sery. Thembi Kgatlana halved the deficit midway through the second half in Casablanca.
Substitute Magaia had a goal ruled offside in added time, then ran on to a headed pass from Ronnel Donnelly and slammed the ball past goalkeeper Aramatou Diakite to snatch a point.
Ivory Coast top the table with four points. Tanzania have three, South Africa one and Burkina Faso none.
Tanzania, who struck a late winning goal against South Africa four days ago, face Burkina Faso later on Friday and will qualify for the quarter-finals if they secure maximum points.
In the final round on Tuesday, Ivory Coast face Tanzania and former champions South Africa meet Burkina Faso.
South Africa must beat the Burkinabe to have a chance of reaching the knockout phase and keeping alive hopes of a second successive World Cup appearance.
Brazil will host the global women's football showpiece in 2027 and the four WAFCON semi-finalists qualify automatically for the 32-nation tournament.
The losing WAFCON quarter-finalists will get a second chance to reach the World Cup through play-offs, first in Morocco and then in an inter-continental competition.
Sery struck on 18 and 36 minutes from assists by another 18-year-old, N'Sira Ouedraogo, to rattle sluggish South Africa, who made four changes after the loss to Tanzania.
The Ivorian teenagers both play for Danish club Nordsjaelland, and their pace and power were threats throughout the opening half.
Realising a loss would almost certainly condemn them to a shock WAFCON exit, South Africa exerted constant pressure after the break against rivals 15 places lower in the world rankings.
Kgatlana cut inside Aicha Fofana and fired past Diakate on 71 minutes to restore hope. Then Magaia levelled with the Ivorian goalkeeper once again beaten at her near post.
dl/mw