Faf du Plessis defied Australia's attack for the second time this week to pull South Africa out of serious trouble on the opening day Friday of a series finale that could determine the No. 1 test ranking.
Du Plessis finished unbeaten on 78 and guided crucial partnerships of 57 with Robin Peterson (31) and 64 with Vernon Philander (28) to lift South Africa from 75-6 to 225 after winning the toss and electing to bat in the third test.
Australia reached 33-2 in the 11 overs before stumps, with David Warner unbeaten on 12 and nightwatchman Nathan Lyon — who got a massive cheer from the WACA crowd when they mistook him for Ricky Ponting — not out on 5.
The Australian reply started badly when Dale Steyn removed Ed Cowan (0) on the third ball and Philander picked up his first wicket in the series when he got an lbw decision against Shane Watson (10) on a referral — overturning umpire Asad Rauf's initial not out call — as the hosts slumped to 18-2.
Ricky Ponting, playing his 168th and final test match, was due in next but was kept in the pavilion as Lyon defended for the last 23 minutes.
A dozen wickets fell on a pacey WACA pitch, with offspinner Lyon returning 3-41 for a new-look Australian bowling attack that was missing all three pacemen who played in the first two drawn tests.
Mitch Starc took two big wickets immediately before lunch and another left-armer, Mitchell Johnson, returned 2-54 in his first test in a year.
Australia's pacemen were on top early and South Africa lost five wickets for 14 runs in about an hour around lunch before allrounder Peterson and then Philander helped du Plessis resurrect the innings.
"Faf's in pretty good form and he's proving pretty difficult to get out at this stage," said Australia's latest fast bowler, John Hastings, who took a wicket in his test debut. "We were close, but probably let it slip a little bit. Still, 225 is a good effort to bowl them out."
Philander batted aggressively, hitting a big six off Lyon and two boundaries before he skied a catch to Mike Hussey at deep mid-on. Steyn (2) chopped a delivery from Johnson onto his stumps to make it 206-9.
A quick cameo from Morne Morkel (17), who plundered four boundaries off Johnson, ended when he miscued Lyon to Hastings at mid-on to end the innings.
Du Plessis ran out of partners and was again the big obstacle for the Australian bowlers four days after he batted through the final day and finished unbeaten on 110 to save the second test on debut at Adelaide on Monday.
He has 266 runs in three innings — and 188 since his last dismissal — after earning his call up when JP Duminy was injured in a training accident during the first test at Brisbane.
He batted for seven hours in his second innings in Adelaide and was unbeaten again in more than three hours on Friday, facing 142 balls and hitting 12 boundaries after going to the crease with his team reeling at 67-5 in the 28th over.
Peterson said du Plessis was extremely confident despite only playing his second test.
"He knows himself as a person and he backs himself, and it comes across on the field," Peterson said. "There were people doubting him, whether he could play test match cricket, (but) those doubts have been thrown out of the window now."
The South Africans started the test positively and had only lost skipper Graeme Smith (16) as they progressed to 61-1 before Starc bowled Alviro Peterson (30) and Jacques Kallis (2), who passed a fitness test to play, with swinging deliveries to make it 63-3 at lunch.
Hashim Amla (11) was dropped off Hastings' bowling in the over after the break but was run out the next over by David Warner's direct hit at the striker's end.
Hastings picked up his first test wicket when AB de Villiers (4) edged to Clarke at slip and Dean Elgar faced 12 balls on debut before attempting to pull a sharply rising ball from Johnson and top-edging down leg side to wicketkeeper Matthew Wade.
"We'd have liked to get 300 after batting first but after being (75-6), we're pretty happy with getting 225," said Peterson, who was caught behind trying to cut Lyon. "Getting two wickets late in the evening really made 225 look like a decent score."
South Africa needs only to draw the Perth test to retain the No. 1 test ranking. Australia needs a win to replace the tourists at No. 1 and has extra motivation for winning after Ponting announced this match would be his last in international cricket.
"It's been a pretty emotional few days for everyone I think," Hastings said. "Ricky is such a legend. It is an end of an era.
"It is a massive motivation — (Australia) will use that over the next four days to get the result that we want."