South Africa's JP Duminy and Dean Elgar both scored centuries in a third-wicket partnership of 250 to drive the tourists to a 388-run lead over Australia at the end of the third day of the first Test Saturday. Australia removed both centurions around the tea break, as well as Temba Bavuma and captain Faf du Plessis in the last hour, but by then the damage had been done and the Proteas will go into day four on 390 for six. Quinton de Kock, who was dropped by Adam Voges on one, was at the crease unbeaten on 16 at the end of a long, hot day at the WACA, along with Vernon Philander, who had made 23 not out. South African paceman Dale Steyn was ruled out of the rest of the series with a fractured shoulder Friday and will play no further part in the match, reducing the number of wickets Australia need to take. Steyn was a member of the Proteas team that chased down 414 to beat Australia at the WACA in 2008 but it was a debutant Duminy who scored the three runs off Mitchell Johnson that got the South Africans over the line. Now 32, Duminy looks to have played a key role in another Perth triumph after his brilliant 141 rammed home South Africa's advantage after it had skittled Australia for 244 in reply to its 242 Friday. Duminy faced 225 balls and hit 20 of them for fours with another going for six, overhauling partner Elgar before lunch and reaching his fifth Test century with two runs to deep cover soon after the break. It was his first century in two years and his third against Australia, just reward for a masterclass of calm control and shot-making. The end came just as it looked like the pair of left-handers would bat through to tea, Peter Siddle benefiting from a DRS review when the technology revealed a nick off the bat that carried through to wicketkeeper Peter Nevill. Elgar did not have such a good experience on his previous visit to the WACA, having got a pair when he made his test debut at the ground in 2012, albeit on the winning team. Dogged and determined where Duminy was fluent, the 29-year-old reached his fifth test century half an hour before tea after a prolonged spell in the "nervous nineties". His career-best 127 came off 316 balls and he had hit 17 fours and one six when Josh Hazlewood finally winkled him out after tea when he offered a tired shot and got an edge which Mitchell Starc took at gully. Starc should have caught Elgar on 81 when the batsman skied the ball to mid-off but he lost the ball in the Perth sun, tripped himself over trying to readjust his position and spilled it on the turf, to the despair of bowler Nathan Lyon. The left-arm paceman also accounted for Du Plessis (32), a fine edge taken behind by Nevill, while Hazlewood had Bavuma well caught by Usman Khawaja at deep square leg for eight but the collapse Australia needed never materialized. Duminy suggested an Australian run chase would be complicated by the fact the pitch was starting to become more difficult to bat on. After Perth, the series continues in Hobart before concluding with a day-night test at Adelaide Oval. — Reuters Scoreboard South Africa (1st innings) 242 Australia (1st innings) 244 South Africa (2nd innings) S. Cook c S Marsh b Siddle 12 D. Elgar c Starc b Hazlewood 127 H. Amla b Hazlewood 01 JP. Duminy c Nevill b Siddle 141 F. du Plessis c Nevill b Starc 32 T. Bavuma c Khawaja b M Marsh 08 Q. de Kock not out 16 V. Philander not out 23 Extras (b4, lb13, w12, nb1) 30 Total (6 wickets, 126 overs) 390 To bat: D. Steyn, K. Rabada, K. Maharaj. Falls: 1-35 (Cook), 2-45 (Amla), 3-295 (Duminy), 4-324 (Elgar), 5-346 (Bavuma), 6-352 (du Plessis). Bowling: Starc 27-7-99-1 (5w), Hazlewood 32-10-97-2 (1nb), Siddle 22-8-47-2, Marsh 22-4-52-1 (7w), Lyon 21-2-76-0, Voges 2-1-2-0.