South Africa are 7-434 and on course for an unassailable first-innings total despite a mini-collapse before tea on day three of the first Test at the Gabba.
The tourists lost four wickets for only 52 runs as they looked to lift their run rate but did what they needed to do to assert their firm control on a match that is fast getting away from Australia.
Tail-enders Dale Steyn (15) and debutant Rory Kleinveldt (one) are at the crease and if Proteas skipper Graeme Smith decides to send them back out after the break, they will be eyeing a total of around 450.
Australia only needs two more wickets because of a ruptured Achilles tendon sidelining JP Duminy.
After South Africa resumed at lunch 3-357, two key wickets in two overs from young gun James Pattinson gave Australia a sniff of keeping the visitors to a manageable score.
First to go was Jacques Kallis, who was lured into a cut shot but instead edged to gully, where Rob Quiney took his first Test catch.
Kallis might have left three runs short of 150, but his work in the middle was already done after a rampaging knock that saw him hit the rope 14 times.
His 147 was his highest ever score against Australia and the biggest ever from a South African at the Brisbane ground.
AB de Villiers followed Kallis soon after, his quickfire innings of 40 coming to a close through a diving catch at point from David Warner.
Australian hearts were in mouths when the umpire decided to check for a front-foot no-ball, but Pattinson was received the all-clear and South Africa were 5-377.
De Villiers smacked five fours in his short time at the crease and had served as the perfect foil for the free-scoring Kallis.
Needing just four more wickets to end the innings, Australia were suddenly daring to dream of a late Proteas collapse.
But Vernon Philander (11) emphatically brought the hosts back down to earth as he feasted off the pricey Nathan Lyon (2-121) with a massive six to bring up South Africa's 400.
Philander soon edged to Michael Clarke and became Peter Siddle's second wicket - leaving the tourists at 4-403 - but Jacques Rudolph (31) kept things ticking along.
On seven, Dale Steyn saw his leg before decision off Ben Hilfenhaus (0-72) overturned when replays showed the ball was sailing well over the stumps - avoiding the same fate as Hashim Amla, who was incorrectly given out in the morning.
If Amla (104) had used the Decision Review System when he was trapped lbw by Peter Siddle, he would never have left the crease.
The last of South Africa's recognized batsmen, Rudolph holed out to Quiney off Lyon in the fourth over before tea.