Australia 209 (S M Katich 55, D W Steyn 4-56) v South Africa 404-3 (A G Prince 150, J H Kallis 102 no)
Ashwell Prince's 150 led South Africa into a position of strength at the end of the second day of the final Test against Australia in Cape Town.
Prince, promoted to open on his return to the side, was in imperious form as the Proteas reached the close at 404-3, a lead of 195.
Stand-in skipper Jacques Kallis also scored a century on his home ground, finishing unbeaten on 102 after sharing a 160-run third-wicket stand either side of tea with Prince.
South Africa are 2-0 down in the series and without regular captain Graeme Smith due to a broken hand.
Kallis was thrust into the leadership duties after Prince - the official vice-captain - turned down the selectors' offer of the captaincy on his recall.
Australia's bowlers toiled hard for the majority of the day, picking up a solitary wicket in each of the three sessions.
Having resumed on 57-0 in reply to Australia's 209, South Africa lost debutant opener Imraan Khan in the fourth over of the day.
Khan (20) played a fraction too early and chipped a return catch to Peter Siddle, who swooped low and one-handed in his follow through to complete the dismissal.
And two balls later Prince survived a referral when Australia captain Ricky Ponting opted to send an lbw shout upstairs after umpire Steve Bucknor declined Siddle's vociferous appeal.
Replays showed the ball had clearly pitched outside the left-hander's leg-stump and vindicated Bucknor, who is standing in his 128th and last Test before retirement.
And from that point the Proteas blossomed, Hashim Amla and Prince sharing a half-century alliance in 106 deliveries to take their side to lunch on 148-1.
Amla (46) gave away his wicket in the third over of the second session to end a 97-run partnership. The right-hander chased a wide delivery outside off-stump from Mitchell Johnson (1-92) but only succeeded in edging through to wicketkeeper Brad Haddin.
Kallis was given an early scare when he ducked into a short ball from Ben Hilfenhaus and was hit flush on the helmet, reviving memories of the second Test in Durban when he was forced to retire hurt after being knocked on the chin by Johnson.
However, he survived and offered good support to Prince, who brought up his 11th Test century in the 56th over of the innings.
There were no nervous 90s as he raced from 89 to 100 in just four deliveries, bringing up his ton when he charged down the track against Bryce McGain and lofted the leg-spinner to the long-off boundary.
Kallis raised the 50 partnership when he lifted the expensive McGain (0-102) over the midwicket fence for six as South Africa reached tea on 256-2.
The third-wicket pair continued to dictate in the final session, taking their stand beyond the 150 mark before Prince finally departed.
The 31-year-old fell three balls after celebrating his personal 150 when he followed a ball from Ben Hilfenhaus (1-97) down the leg-side.
Umpire Bucknor turned down Australia's appeal for caught behind off the glove but Ponting decided to use his final referral and was rewarded when, after lengthy deliberation, TV umpire Billy Bowden overturned the ruling on the field.
Bowden's decision ended almost six hours and 249 balls of crease occupation from Prince, who was playing for the first time since losing his spot in the middle-order to JP Duminy on the tour Down Under at the turn of the year.
But his departure did not stop South Africa pressing on as Kallis and AB de Villiers (39no) cashed in against the second new ball to see South Africa through to stumps.
With just under four overs remaining, Kallis ended an 11-month century drought with a scampered single off Siddle (1-35), albeit the landmark was confirmed in slightly odd circumstances.
Umpire Asad Rauf initially signalling leg-bye, before concurring with Bowden upstairs and then reversing his call to allow Kallis to celebrate a 31st Test century.