PERTH Hashim Amla scored 196 and AB de Villiers 169 in a batting exhibition that drove South Africa to a commanding lead of 631 runs before they were dismissed for 569 on the third day of the third test against Australia on Sunday.
Australia were left needing to better the record for a successful fourth-innings chase by 213 runs to record an improbable win or bat for two more days to force a draw and save the series.
The hosts had eaten into their target to the tune of 40 runs without loss by the close of play with openers David Warner (29) and Ed Cowan (nine) having survived a sometimes nervous last hour.
After the first two tests in Brisbane and Adelaide ended in draws, South Africa only needed a third in Ricky Ponting's last test to ensure they remained the world's number one side.
They will now be expected to do considerably better than that and become the first team since the West Indies in the 1980s and early 1990s to win consecutive series in Australia.
De Villiers said the Proteas were taking nothing for granted, however.
"We know we have a lot of hard work to do tomorrow, it's a good wicket. If the test match goes the full length, they will come close," he told reporters.
"We are not arrogant in any way whatsoever. It won't be easy. We know the Australian batsmen are dangerous players and won't be giving it away."
Amla's brilliant innings was one for the purists, while de Villiers started slowly before accelerating after he reached his fifty to bludgeon the Australian bowlers with every shot in the book.
Picking up where he left off on Saturday when he helped the tourists plunder 206 runs in the extended third session, Amla got the single he needed to reach his 18th test century from the third delivery of the day.
Peppering his innings with some sublime cover drives for a good few of his 21 boundaries, Amla's comfort at the crease had echoes of his unbeaten 311 against England at the Oval in July.
Australia's pace unit, acclaimed after ending South Africa's first innings for 225, toiled in the sunshine looking for a breakthrough but their best efforts only slowed the flow of runs.
It took a brilliant catch from Mitchell Johnson off his own bowling to dislodge Amla shortly before tea as the 29-year-old was approaching a double century after 350 minutes and 221 balls.
Johnson (4-110) found a little bit of extra pep with the new kookaburra and when the South African drove the ball back at him, he snatched it out of the air for a second superb caught and bowled of the innings.
Dean Elgar was despatched lbw by Johnson four balls later for a pair of ducks on his debut but the day already belonged to South Africa's batsmen.
De Villiers had moved reasonably cautiously to his 50, with the exception of one huge six off spinner Nathan Lyon that hit the second deck of the stand at long on.
He upped the pace with a string of quickfire boundaries to reach 89, then graduated to his 14th test century in stunning style with three successive reverse sweeps for four, again off Lyon.
Faf du Plessis (27) and Robbie Peterson, who failed to score, came and went before Johnson's fellow left-armer Mitchell Starc (6-154) finally removed de Villiers caught behind.
The 28-year-old was clearly furious with himself for having fallen short of the double century after his innings of 169 off 184 balls with 21 fours and a trio of sixes.
Ponting had earlier bowled one last test match over at the cost of three runs to huge applause from the 13,000 crowd at the WACA, but the chance of finishing his career with a victory was surely gone.
The 418 scored by West Indies against Australia in 2003 was the highest successful fourth innings run chase in test cricket, while South Africa scored 414 to win the corresponding test at the WACA four years ago.
"It's just batting session by session. We've got to believe we can do it," said Australia coach Mickey Arthur, who was in charge of South Africa in that 2008 test.
"We've got to believe we can bat for two days. It's a new ball wicket. If we get through the new ball, you never know what might happen."
(Editing by Patrick Johnston)
Our top photos from the last 24 hours.