AB de Villiers resisted with 52 not out, putting on 67 with JP Duminy after the fifth wicket pair came together with South Africa on 43-4 when Peter Siddle trapped lynchpin No 3 Hashim Amla lbw for 17.

Johnson did the early damage, bouncing out Smith and Du Plessis and having Petersen caught behind cutting during a lively opening spell.

Siddle followed up with the key wicket of Amla and, after De Villiers and Duminy fought back either side of tea, spinner Nathan Lyon had Duminy (25) caught by Johnson running back from mid-off.

Smith century

Australia had themselves collapsed in the morning, going from an overnight 297-4 to 397 all out shortly after lunch.

Steve Smith, resuming on 91, did manage to collect the nine runs required to complete his fourth Test hundred - all the others coming against England in the last year - from 211 balls, including 13 fours.

But Smith went for exactly 100, edging a McLaren delivery to Petersen at second slip.

Shaun Marsh advanced from 122 at the start of the day to a career-best 148 before he became Vernon Philander's lone victim in the innings and Dale Steyn cleaned up the tail to finish with 4-78.