Australia were 175 for two at lunch, with Hayden unbeaten on 78. Ponting was dismissed for 74 off the last ball before the interval. South Africa made 205 in their first innings.
Hayden and Ponting took the total from an overnight 63 for one with a mixture of watchful defence, luck and some aggressive batting once had they drawn the sting from the bowlers. The posted a century partnership off 174 balls but needed only another 60 deliveries to add another 50.
They were initially made to work hard for their runs on a pitch which still offered some seam movement to the bowlers, although on a sunny, cloudless day the conditions were not nearly as bowler-friendly as they were on an overcast first day.
The left-handed Hayden did not offer a chance but he was lucky with three successive scoring shots which took him from 28 to 37, an edge through the slips, a top edged pull and an edge which flew over the slips.
Ponting twice edged Andrew Hall on either side of his half-century, once past a solitary slip and another between wicketkeeper and slip. On 61 he was dropped by Andre Nel at fine leg off Hall.
Jacques Kallis, who was only introduced to the attack in the 41st over, finally made a breakthrough when Ponting was caught by Hall at short cover. He made his 74 off 112 balls with eight fours and a six.