A final session rich with runs put South Africa in complete control on the second day of their third and deciding Test with Australia in Perth.

With both sides having been dismissed cheaply first up, the Proteas headed back to the crease just before tea with a lead of 62. Come stumps their card read 230 for two, an overall advantage of 292.

They helped themselves to 206 runs in the final session, with Hashim Amla walking off unbeaten on 99 while Graeme Smith (84) was only stopped on his way to a century by a brilliant catch from Nathan Lyon.

The same player would drop Jacques Kallis shortly after, though, although with a lead of close to 300 already and with plenty of time on their side, South Africa would have no doubt remained in command regardless.

Their riotous session overshadowed the grand farewell of Australian batsman Ricky Ponting, although the retiring Tasmanian will probably be glad of that. He contributed just four to a first-innings total of 163 all out which left South Africa in credit before they even started their second innings.

It was their rousing bowling performance that gave them the platform, on a morning when fans had flocked to the WACA in anticipation of one last masterclass from the departing Ponting, but instead it was the Proteas attack who grabbed the limelight as they took eight wickets for 130.

Australia, who need to win to return to top spot in the ICC rankings, would have been in more trouble had wicketkeeper Matthew Wade not made a fluent 68.

Some streaky hitting from Alviro Petersen took South Africa to 24 without loss at tea but, after he went to Mitchell Johnson, caught and bowled off a riser, the tourists took a firm grip on proceedings.

Smith brought up his 50 off 67 balls - Amla outpaced him and did it in 37 - although the hosts thought they had snared Smith when Mitchell Starc pinned him and was given out, although his review proved a correct one as replays showed the ball was going over the top.

Smith would eventually perish with the partnership on 178, hooking Starc into the hands of Lyon who did brilliantly to dive forward running in from the boundary, although he was unable to cling on when Kallis did something similar on three.