Australian captain Tim Paine praised the fight shown by his team after they had the better of the third day of the fourth Test at the Wanderers Stadium on Sunday, helped by his 62 despite batting with a broken thumb.
Australia are still in a desperate situation, with South Africa going into the fourth day leading by 401 runs with seven wickets in hand.
The Proteas, leading the series 2-1, need only to draw to beat Australia in a home series for the first time since 1969/70.
But the progress of the hosts was slowed by Australia's fightback -- and an injury to Morne Morkel which could weaken South Africa's bowling attack when Australia bat again.
"We're a long way behind the game, there's no doubt that, but I'm happy with the spirit and the fight with the bat and the discipline our bowlers showed," said Paine.
Appointed following the ball-tampering scandal which led to Steve Smith being banned, new captain Paine set the example in the morning.
Despite batting with a hairline fracture of his right thumb, he made a defiant half-century before being last man out.
From a seemingly hopeless overnight total of 110 for six, Australia added another 111 runs before being bowled out.
Paine sustained his thumb injury while keeping wicket on Saturday. "It's okay," he said. "It's got a little crack in it. It hurts a little bit but I've had my fair share of finger injuries and compared to a couple of others it's not too bad."
South Africa did not enforce the follow-on, with doubts about the ability of Morkel to bowl because of a side strain.
Australia's bowlers then restricted the hosts to a run rate of 2.4 in the second innings as they laboured to 134 for three at the close.
"We were very disappointed with the way things went yesterday (Saturday)," said Paine, who revealed that the players had spoken about it after play and had resolved to respond positively.
"We didn't get the wickets we perhaps deserved but I was really proud of the way the bowlers stuck at it, the same with our fielding group," said Paine. "I thought our energy right through the innings was excellent."
- Cummins shows all-round ability -
Paine and Pat Cummins walked out to resume the Australian innings on a heavily overcast morning, with their team facing the humiliation of being bowled out quickly and forced to follow on.
But they stayed together for most of the morning, with Cummins making a Test-best 50 off 92 balls before he missed a sweep and was leg before wicket to left-arm spinner Keshav Maharaj shortly before lunch.
Their seventh-wicket partnership was worth 99, the best for any wicket by Australia in the series.
"We all know how good Pat is as an all-round cricketer," said Paine. "This tour he has been superb, he was fantastic in the Ashes as well."
Morkel, playing in his last Test before retiring from international cricket, broke down as South Africa toiled in search of a breakthrough, leaving the field two balls into his fourth over of the day.
A South African team spokesman said the injury was in the same area that he damaged in a Test against Bangladesh in October, keeping him out of action for two months.
But after being strapped up, Morkel bowled a few gentle deliveries to coach Ottis Gibson during the lunch break and took the field with the rest of the team after the interval, giving hope that he may be able to bowl in the second innings, even if not at full pace.
Maharaj said he thought Morkel would be fit but acknowledged that he could have to bowl a large number of overs in the second innings to support fast men Vernon Philander and Kagiso Rabada.
Maharaj noted the bounce and turn achieved by Australian off-spinner Nathan Lyon, who beat the bat frequently on Sunday afternoon.
"There will be a lot of emphasis on the spin but I actually think it is turning and bouncing too much to find an edge," he said.