Themba Zwane and Percy Tau both grabbed a brace as Molefi Ntseki's Bafana Bafana left it late in a 4-2 win over minnows Sao Tome and Principe on Monday in a roller coaster 2021 AFCON qualifier at the Nelson Mandela Bay Stadium.
Sao Tome, 182nd in the FIFA world rankings, took a shock lead in the 12th minute when captain Joazhifel Pontes got his head on the end of a corner-kick to give his side an early advantage.
Ntseki's charges dominated most of the first-half in terms of possession but just lacked the necessary end product in their final pass to punish their opponents.
Bafana Bafana managed to grab a crucial equaliser shortly before half-time in the 39th minute when Dean Furman played an impressive reverse through-ball into Zwane, who coolly slotted the ball home.
The Mamelodi Sundowns midfielder's equaliser proved vital as the two sides went into the half-time break on level terms.
Tau had a glorious chance to give Bafana the lead in the 51st minute when he was played in on goal but scuffed his shot wide as he attempted to bend his effort inside the far post.
Bafana continued to take the game to their opponents with the midfield duo of Furman and Zungu dictating the pace of proceedings.
In the 70th minute that pressure told as Tau gave Bafana a deserved lead with a classy finish after some inter-play with goalscorer Zwane.
Zwane this time proved provider for his former Sundowns team-mate as he dummied to shoot before laying it off for Tau who sat down a few defenders before rifling a shot into the net.
Sao Tome then equalised in the 75th minute against the run of play after Harramiz Soares found himself unmarked at the back post before producing a powerful header past a hapless Ronwen Williams.
At this point South Africa had enjoyed 65% possession of the ball to their opponent's 35% with 12 shots at goal, with three on target to Sao Tome's 9 attempts with the same number on target.
But Zwane scored a crucial second goal three minutes from time in the 87th minute to save Bafana's blushes as he got on the end of a deflection from substitute Kermit Erasmus' attempt at goal.
Tau then joined in on the act by completing a brace of his own in the 88th minute when proving too good for the opposing defence before cutting in on his right to hammer the ball past goalkeeper Adaim Gamboa.
That's how matters ended with Bafana Bafana needing late heroics from their attacking duo to ensure maximum points from their back-to-back matches against the islanders.