New captain Paine made 62 with Australia up against it in the series decider and played through the pain of a fractured thumb sustained while he was wicket-keeping the day before.
But despite Paine's fighting half-century — and another one from bowler Pat Cummins — South Africa bowled Australia out for 221 in its first innings and then extended its lead to 401 runs by the end of the day.
South Africa ground its way toward a series win with an unbeaten 40-run partnership between Dean Elgar (39 not out) and skipper Faf du Plessis (34 not out). Those two opted to be resolute and give away nothing. Elgar made just 5 runs in 61 balls in that unbeaten stand to take South Africa to stumps.
South Africa leads 2-1 and was edging toward a first test series win over Australia at home since 1970.
That history might have been lost on an Australia team worried for its future after the ball-tampering scandal from the last test led to long-term bans for captain Steve Smith, vice-captain David Warner and batsman Cameron Bancroft, and forced Paine into the top job.
Tasked with putting the shattered morale of the team back together, he led from the front, combining with Cummins for a 99-run partnership at the start of Sunday after Australia was in danger of collapsing at 96-6 on Day 2.
After being diagnosed with the fractured thumb on Saturday, Paine stayed on as wicketkeeper while Australia was in the field and also took his place in the batting lineup. He was 5 not out overnight and hit seven fours and two sixes in all to give Australia's first innings a little respectability despite it being way behind South Africa's.
Paine was last man out to a running, diving catch by Elgar, which gave the innings a gripping finish. Fast bowlers Vernon Philander and Kagiso Rabada and spinner Keshav Maharaj all picked up three wickets each for South Africa.
Cummins made 50 and also removed Aiden Markram and AB de Villiers early in South Africa's second innings for his sixth and seventh wickets of the game.
While Paine battled it out, South Africa also had an injury complication, with retiring fast bowler Morne Morkel picking up a left side strain. He left the field in the first session to get treatment and some strapping, but returned and would try and "push on" for the rest of his farewell game, the South Africa team said.
Du Plessis was also struck a painful blow on the right index finger, a finger he's broken and had problems with already this season.
First Published: April 1, 2018, 9:35 PM IST