South Africa, fired by a devastating spell of bowling from Dale Steyn and sustained by the batting of Hashim Amla, took a firm grip on the third and final test against Australia on Saturday to end day two with an imposing lead of 292.
Amla finished the day one run short of his 18th test century with South Africa on 230 for two after paceman Steyn had taken 4-40 as the bowlers dismissed the hosts for 163 for a first innings lead of 62.
Skipper Graeme Smith put on 178 for the second wicket with Amla before departing for 84 late in the day to leave Jacques Kallis, who had made 17 not out, to resume on Sunday.
Australia had started the day on 33-2 in front of a bumper WACA crowd hoping to see Ricky Ponting score a century in his penultimate innings and drive his country towards a series victory and the number one test ranking that would go with it.
Their hopes lasted less than 40 minutes as Steyn, who took three wickets at the cost of just four runs in the morning sun, and his fellow quicks Vernon Philander (2-55) and Morne Morkel (1-19) unleashed the barrage the Australians had feared all series.
The first ball of the Steyn's first over dispatched opener David Warner caught behind for 13 after a fruitless TV appeal, while his fourth sent nightwatchman Nathan Lyon back to the pavilion for seven.
Ponting, who had been welcomed by a standing ovation, managed just four runs when he was trapped lbw by Philander, his subsequent appeal to the TV umpire having less merit than Warner's but proving just as fruitless.
With their free-scoring captain Michael Clarke at the crease, Australia's hopes of a first innings lead were still alive but Steyn squashed them with his best ball of the series.
A fullish effort delivered at full pace that moved away at the last moment, the delivery induced Clarke into an edge that AB de Villiers collected behind the stumps.
Only wicketkeeper Matthew Wade, who scored a bright 68, and debutant pace bowler John Hastings, the last Australian out for 32, offered any real resistance to the South Africans.
Wade built a partnership of 55 with Mike Hussey and brought up his second test half century from 51 balls by launching his third six over the deep midwicket boundary.
Hussey was removed by Morkel having eked out 12 runs in 68 balls before Robbie Peterson, who finished with 3-44 after being recalled for his first test in four years, bowled Wade and mopped up the tail just before tea.
South African opener Alviro Petersen had ended the Australian innings with a brilliant catch to dismiss Hastings, flicking the ball into the air as he fell over the boundary rope and returning to the field to take the catch.
After a bright start, his own innings was ended for 23 after tea by an even better effort when Mitchell Johnson, off his own bowling, flung himself down to his right to take the ball just above the turf.
Smith, who scored his 84 off just 100 balls with 13 fours, was victim of a third sensational catch when Lyon dived low to claim the ball in the deep over square leg with the end of the day in sight.
It was a rare bright moment in a hard day for Australia, particularly for left-arm quick Mitchell Starc who ended up with figures of 1-76.