PERTH: Dean Elgar and Jean-Paul Duminy hit centuries on Saturday to put South Africa in control of the first test by taking a 388 lead run with four wickets in hand against Australia.

South Africa was 390-6 in its second innings at stumps on the third day at the WACA Ground with Quinton de Kock and Vernon Philander unbeaten on 16 and 23 respectively. South Africa leads by 388 runs.

Australia picked up a cluster of late wickets after a 250-run third wicket stand between Elgar (127) and Duminy (141).

South Africa was well placed to take a stranglehold of the test on 295-3 at tea, but stumbled soon after and lost Elgar, skipper Faf du Plessis (32) and Temba Bavuma (8).

When Australia bats again, against an attack which is missing injured spearhead Dale Steyn, it will be on a pitch that has cracks widening and producing unplayable bounce.

The day belonged to Elgar and Duminy who shared the highest third-wicket stand against Australia since South Africa returned to international cricket following years of isolation due to its apartheid policy. Eddie Barlow and Graeme Pollock in Adelaide shared a stand of 341 in the 1963-64 series against Bob Simpson's team.

The tourists looked like going through the opening two sessions of the day without losing a wicket but Duminy was caught behind off swing bowler Peter Siddle with the last ball before the interval.

Duminy was given not out by the on-field umpire, but Australia successfully reviewed the decision to end the 250-run partnership between the left-handed pair.

South Africa trailed by two runs on the first innings and was in difficulty at 45-2 when Elgar and Duminy started their partnership.

Duminy, the dominant partner in the stand, was the first to reach his ton, smashing 17 boundaries in the process. Resuming after lunch, he punished swing bowler Mitchell Starc and Josh Hazlewood for five boundaries in the space of 10 balls.

It was Duminy's first hundred in 19 innings since his century against Sri Lanka in Galle in July 2014. It was his fifth century in a 37-test career.

Duminy's innings was studded with his trademark cover drives which resulted in the majority of his boundaries. He batted for 6 1/2 hours and faced 225 balls.

Elgar, who made a pair in his first test appearance against Australia at the WACA, made up for that with an innings that lasted 473 minutes. Elgar's fifth test century ended with a tired shot as he spooned a catch to Starc at gully off Hazlewood (2-97). Elgar hit a six and 17 fours off 316 balls.

Australia toiled unsuccessfully over two sessions. Prior to the Duminy dismissal, the only time it came close to a breakthrough was when Elgar skied a shot on 81, but Starc badly misjudged his catching attempt.