Matt Renshaw hit a career-best 190 to rescue Australia from 124-6 to 390 all out on day two of the first test against South Africa at Kingsmead on Saturday.
Resuming on 187-6 overnight, Renshaw added 86 in 191 balls with captain Pat Cummins for the seventh wicket, an Australian ground record against South Africa in Durban.
Cummins made 43 off 98 balls before edging Wiaan Mulder to Aiden Markram at second slip with the second new ball.
Mulder then bowled Mitchell Starc with a delivery that pitched on leg to hit middle and off for his fourth wicket.
Renshaw, 30, playing his 16th test since debuting against South Africa at Adelaide a decade ago, reached his hundred before lunch.
His only previous century was against Pakistan in Sydney in 2016/17.
The left-hander batted at number five and showed immense discipline, facing 397 balls over seven hours and 48 minutes with 21 fours and a six.
He shared a record 134-run ninth-wicket stand off 286 balls with Nathan Lyon, the second-highest ever for Australia for that wicket, before Lyon was removed by Marco Jansen.
Renshaw fell edging Simon Harmer to slip for 190 just after tea.
Bad light stopped play at 16:25 with South Africa 27-1, 363 runs behind, after Josh Hazlewood had Ryan Rickelton caught at third slip for a duck.