Kagiso Rabada claimed five wickets to lead South Africa to a 177-run victory over Australia in the first Test at Perth.

Australia put up a brave fight chasing a notional 539 for victory with half-centuries from Usman Khawaja and Peter Nevill but ultimately fell short, bowled out just before tea on the final day for 361 when Keshav Maharaj trapped Nathan Lyon lbw.

Rabada shouldered the load after Dale Steyn was sidelined by a shoulder injury on the second day and returned figures of five for 92 for the fourth five-wicket Test haul of his career.

Australia began the final day on 169 for four with Khawaja and Mitchell Marsh at the crease, but they only lasted until the eighth over of the day when Rabada separated them.

Peter Nevill showed resistance with a battling half-century (Getty)

Rabada hit Marsh on the foot with a reverse-swing yorker and although the initial appeal for lbw was turned down, the TV replay showed the ball crashing into leg stump and the decision was overturned on review, dismissing Marsh for 26.

Khawaja was the next to go for 97 when he played back to the part-time off-spin of JP Duminy and was lbw to leave the hosts on 246 for six.

Rabada wrapped up his five-for with another in-swinging yorker, trapping Mitchell Starc lbw for 13, and Australia went into the lunch break on 263 for seven.

Vernon Philander was the next to strike with the new ball, one that kept a little low to trap Peter Siddle lbw for 13.

Dale Steyn was not able to bowl on the final day after suffering a shoulder injury (Getty)

That brought Josh Hazlewood to the wicket to join Nevill and the pair frustrated the tourists for 20 overs in a partnership of 65 that saw Nevill bring up his half-century off 138 balls with six boundaries.

Nevill and Hazlewood were looking like they would carry Australia to tea but the latter gifted Temba Bavuma a first Test scalp with a leading edge straight to Dean Elgar at cover to depart for 29.

And with South Africa claiming the extra half-hour before the tea interval, Maharaj came into the attack and with his first delivery wrapped up the victory when he picked up the fifth lbw decision of the innings to remove Lyon for eight.