Paceman Kagiso Rabada took 5-92 as South Africa completed an emphatic 177-run victory over Australia in the first test at the WACA on Monday after dismissing the hosts for 361 just before tea on the final day.

The tourists claimed a third successive victory at the WACA after 2008 and 2012 triumphs and a 1-0 lead in the series, which continues in Hobart on Saturday and concludes with a day-nighter at Adelaide Oval.

Australia’s batsmen were unable to cope with Rabada’s pace and swing as the 21-year-old took his fourth five-wicket haul in his ninth test, making light of the absence of South Africa’s injured pace spearhead Dale Steyn.

It was Australia’s first test defeat at home since that 2012 loss at the WACA and there was more bad news at the end of the day when it was confirmed that opener Shaun Marsh had broken his finger and would not play in Hobart.

South Africa declared on 540-8 after lunch on Sunday, leaving Australia with an imposing 539-run victory target or more realistically almost five sessions to bat out for a draw.

It was a remarkable turnaround after Australia, having dismissed South Africa for 242 on day one, were 158 without loss before collapsing to 244 all out.

“Disappointing,” said Australia captain Steve Smith. “We need to try and let this performance go and come out in Hobart and try and turn it around.

“We’re going to have to play better cricket against a quality South African team if we’re going to do it.”

Man of the Match Rabada accounted for Mitchell Marsh (26) and Starc (13), both lbw, to take his match tally to seven wickets.

Duminy’s first delivery skidded into Khawaja’s back pad, however, and the 29-year-old became the second Australian batsman to perish on 97 after Warner in the first innings, the wicket that triggered the collapse.