On a scorching day, the hosts were 386-3 at stumps on day two of the second Test, leading by 197 after the Proteas were dismissed in their first innings for 189.
Travis Head was not out 48 with Alex Carey on nine.
Steve Smith (85) and Marnus Labuschagne (14) were the only wickets to fall. But worryingly for Australia, Cameron Green, who took 5-27 in South Africa’s first innings, also retired hurt after a nasty rap on the finger from Anrich Nortje.
Smith and Warner’s 239-run partnership took the game further away from South Africa, whose bowlers toiled in temperatures touching 37 degrees Celsius (98.6 Fahrenheit).
Warner, 36, snapped a near-three-year century drought in typically aggressive and gritty fashion, reaching three figures for a 25th time after coming into the game under pressure after a lean run.
It was his first Test hundred since January 2020 and as the opposition bowlers tired, he battled the elements and converted it to 200 for only the third time.
But it was an exhausting effort, as he passed 8,000 Test runs en route.
Chairs had to be brought out for Warner and Smith to rest on in the drinks breaks, with towels draped over their heads and ice-packs around their shoulders.
Warner needed treatment for cramp several times and retired in pain after reaching 200 and dropping to his knees, eventually helped from the field by support staff.
Australia resumed on 45-1, having lost Usman Khawaja late Monday after taking charge of the opening day, with Green’s heroics helping dismiss the visitors for under 200 again.
They were all out for 152 and 99 in the first Test in Brisbane, which they lost by six wickets inside two days.
Warner began on 32 and showed his aggressive intent with an early boundary off Kagiso Rabada.
Nortje was routinely sending down 150 kph (93 mph) rockets, smacking Warner on the head when he was on 47. The batter was given the all-clear after a mandatory concussion test on the field, with a lengthy delay as a new helmet was found.
But disaster struck two balls after play resumed.
Warner pushed Nortje for a single and came back for a second, but Labuschagne hesitated and was run out despite a lunging dive.
After a tremendous knock in scorching heat, @davidwarner31 walks off to a standing ovation for an incredibly well-e… https://t.co/xPEjz6sGXa
— Cricket Australia (@CricketAus) 1672121923000
Unfazed, Warner put his head down to motor to 100, punching the air when he got there with a boundary after a near-flawless knock characterised by his trademark strong running between the wicket.
Smith was not as comfortable, escaping on nine when he was dropped by wicketkeeper Kyle Verreynne and then on 39 when he was given out caught behind only for it to be called a no-ball after Rabada overstepped the mark.
But he persevered to reach a 37th Test fifty with a four off Marco Jansen.
Warner upped the ante after his century and raced to 200 off 254 balls before calling it quits.
Smith departed shortly before his partner reached the milestone, with Nortje getting his reward for a hard day’s work, with Theunis de Bruyn taking a catch at gully.