The 548 balls he faced across the test are the most by any of his countrymen in New Zealand, surpassing Daryll Cullinan's 490 at Auckland in February 1999.
"It has been tough and I think that's why Dean enjoys it," South African batting coach Neil McKenzie said. "He's a gutsy, gritty cricketer and it suits him when he has to work hard for runs. Test cricket is not always about the easy, fluent runs, it's about the ugly, hard ones.
It was an autumn atmosphere where full cable-knit sweaters were de rigueur, hands were embedded in pockets and one could be forgiven for fantasising about piping hot pumpkin soup.
The Black Caps missed a swag of opportunities to steal an advantage in the first session. The Proteas survived two failed reviews, one non-review that would have earned a wicket, and two dropped catches.
They recovered to earn three for 67 in the final stanza. The guile of Jeetan Patel was the highlight with two for 72 from 36 overs, including his fourth consecutive dismissal of Quinton de Kock in an international innings. At one point he bowled 28 straight overs from the northern end.
Left-armers Trent Boult (one for 34) and Neil Wagner (two for 57) worked in metronomic fashion to test the visitors early amid a gloom that felt like an extended solar eclipse.
Boult suffered a sore upper left thigh for his efforts which prevented him bowling with the second new ball. His fitness will be monitored overnight.
Wagner coaxed Amla (24) into a trap laid at short mid-wicket. A short-of-a-length ball was fended into substitute fielder Tim Southee's hands. Amla looked vulnerable after getting hit on the fingers by Boult's first ball of the day.
Elgar and Jean-Paul Duminy (39) then grafted a 74-run third-wicket stand.
Faf du Plessis continued his barnacle opener's battle of attrition to post an unbeaten 56.
New Zealand suffered for their judgment calls on five occasions.
1. A failed review from Boult in the 25th over when a ball hit Duminy's pad, rather than the bat on the way through to B-J Watling's gloves. Duminy was on two.
2. Tom Latham dropped a first slip catch off Boult in the 29th over when Duminy was six.
3. No review was taken when Patel hit Duminy (20) on the back leg in the 38th over which, albeit in hindsight, the ball tracker showed hitting the stumps.
4. An lbw review was taken against Duminy (20) in the 40th over when an inside edge hit his pad.
5. Elgar (35) edged Jimmy Neesham in the 41st over, but the ball clipped Watling's outstretched glove.
Neesham had two first slip catches elude him from Elgar off Patel and Mitchell Santner. One fell short; the other squirted to his left.
"We put down couple of chances... but the way guys kept fighting was impressive," Patel said. "A couple of reviews didn't go our way and we might have to look at how we discuss those going forward.
"I didn't realise he [Duminy] had hit the lbw [review] off me. You can get caught up in the emotion, I wanted to get in the game and got fizzed up."