South Africa beat Australia by six wickets in the second Test to level the four-match series at 1-1.
The hosts wobbled chasing 101 to win on day four but AB de Villiers top-scored with 28 in Port Elizabeth, having also hit 126 not out in the first innings.
South African fast bowler Kagiso Rabada took six second-innings wickets to finish with match figures of 11-150.
However he could miss the remainder of the series after twice being charged for misconduct during the Test.
In a hotly contested series he was charged over incidents with Steve Smith on day one and David Warner on day three, following controversy between Warner and South Africa’s Quinton de Kock in the first Test.
Australia started the penultimate day 180-5 with a lead of 41 runs but Rabada bowled Mitchell Marsh in the first over of the day.
He also dismissed Pat Cummins and Mitchell Starc on the way to his six-wicket haul as Australia were bowled out for 239 before lunch.
South Africa lost openers Dean Elgar and Aiden Makram early before they were steadied by a 49-run partnership between De Villiers and Hashim Amla.
Both then fell in consecutive overs but Theunis de Bruyn and captain Faf du Plessis saw South Africa to victory.
The third Test starts on 22 March in Cape Town.