Perth: Emerging paceman Kagiso Rabada edged South Africa closer to victory against Australia on the fifth day of the opening Test in Perth on Monday, with the home team struggling to cling on.
Set a mammoth victory target of 539, Australia were 263 for 7 at lunch on the final day with their hopes of salvaging a draw hanging by a thread.
Peter Nevill was on 20 and Peter Siddle yet to score, with the Proteas almost certain to maintain their unbeaten record at the WACA ground.
With star pacemen Dale Steyn missing due to a shoulder injury that will sideline him for at least six months, Rabada stepped up to lead the South African attack.
The 21-year-old claimed three wickets on day four and snared two more on the final day.
A searing Rabada yorker to Mitchell Marsh hit him on the pad on 26, but he was given not out by umpire Aleem Dar.
The South Africans reviewed the decision and were successful, ending a 50-run stand between Marsh and Usman Khawaja to strike an early blow.
Rabada then made it five wickets when he trapped Mitchell Starc lbw with another fast yorker for 13.
Rabada is shaping as a perfect long-term replacement for Steyn, having also claimed the wickets of Shaun Marsh (15), Steve Smith (34) and Adam Voges (1) in the Australian innings to have figures of 5-73 from 24 impressive overs.
JP Duminy capped his fine match, having made a century in the South African second innings, by claiming the wicket of Khawaja with his part-time spin, lbw for 97.
Australian opener David Warner fell for the same total in the Australian first innings.
Earlier, diminutive batsman Temba Bavuma, who produced one of the great run-outs on the fourth day to snare the first Australian wicket, was brought on to bowl and almost struck with his first ball in Test cricket.
It skidded through and struck Khawaja right in front of the stumps, but Bavuma had overstepped and it was a no ball, denying him becoming just the 21st bowler to claim a wicket with their first Test delivery.
South Africa declared their second innings on 540 for 8 after lunch on the fourth day to set Australia the record run chase.