South Africa need six wickets on Thursday for what would be a remarkable victory.
They would have liked to be further down the road after enforcing the follow-on midway through the second session, but they remain the pacesetters in this second Test at St George's Park.
That is primarily due to a raging morning session in which Australia were skittled for just 99. The scenes that unfolded were almost unbelievable as the world's No. 1 Test side capitulated in dramatic fashion.
Marco Jansen was the chief destroyer with 5/33, his fifth Test five-for, to go with his game-changing 85 with the bat on Tuesday, while Wiaan Mulder (2/14) and the returning Kagiso Rabada (2/33) chipped in with two wickets apiece.
It left Australia 326 runs behind and facing a mountain to climb if they were to salvage the Test. The challenge became even steeper after Rabada removed Nic Maddinson for the second time in the match with the new ball after Temba Bavuma had no hesitation in enforcing the follow-on.
The Proteas, however, suffered a major setback during Australia's first innings when Anrich Nortje walked off with a suspected groin injury in the 16th over.
But that did not deter South Africa from continuing their push for a series-levelling victory.
Travis Head played an uncharacteristically restrained innings but fought valiantly for his unbeaten 87.
For a period, he had Marnus Labuschagne (39) for company, with the pair adding 92 for the second wicket before the Klerksdorp-born batter was the architect of his own downfall.
Labuschagne, whose Test future will now come under even greater scrutiny ahead of Cape Town, skipped down the wicket in an attempt to hit Simon Harmer (2/47) over the top.
In what could only be described as a brain fade, particularly given the gusting wind, Labuschagne offered Jansen a simple catch in the deep. The lanky all-rounder, who had earlier dropped Head on five in the gully, comfortably covered the ground to complete the catch.
From there, Australia's struggle continued. Rabada returned to bowl Matthew Renshaw before Harmer trapped Beau Webster plumb in front.
The Proteas will now have three sessions to wrap things up on Thursday, weather permitting, which would complete a remarkable turnaround considering where they were after two and a half days of this Test.
SCORECARD
2nd Test, Day 4, Stumps
South Africa: 425/9 declared
Australia: 99 (Jansen 5/33) and 156/4 (Head 87*, Labuschagne 39, Rabada 2/30, Harmer 2/47)
Australia trail by 170