Wellington - Alviro Petersen batted more than eight hours over three weather-affected days to reach his highest Test score of 156, tightening South Africa's grip on the third Test against New Zealand by stumps on the third day.
Petersen's 493-minute knock, which incorporated partnerships of 93 with Hashim Amla (63) and 200 with JP Duminy (103), allowed South Africa to declare after tea on Sunday at 474-9 after a first innings drawn out by rain and bad light.
At the declaration, South Africa's position seemed invulnerable in a three-match series they lead 1-0.
But Mark Gillespie led a late Kiwi fightback, taking a career-best 6-113 while Daniel Flynn (35) and Martin Guptill (28) saw New Zealand to 65 without loss by stumps.
The 32-year-old Gillespie followed up his 5-59 in the second Test at Hamilton with his third haul of five wickets or more in a Test, further endorsing the selectors' decision to recall him after a four year absence.
Flynn, who was recalled for this Test after last playing for New Zealand in December, 2009, also rewarded that decision when, with Guptill, he defied South Africa's powerful pace attack for 107 minutes before stumps.
The Proteas remain in a position from which they are highly unlikely to lose the match and therefore to take out the series 1-0 after winning the second Test by nine wickets. For that, they owe a great deal to Petersen who anchored their innings over the best part of three days in a major feat of concentration.
He batted through the 42 overs bowled between a rain-delayed start and a finish hastened by bad light on the first day. He batted on through all of the 37 overs allowed by rain and bad light on the second day.
And he batted through all of the first session on Sunday, completing his third Test century and surpassing his previous-highest Test score of 109 before falling four balls after lunch. In total, his innings last 8 hours, 13 minutes; he faced 335 balls - the equivalent of more than 56 overs - and he hit 19 fours and a six.
"It is satisfying," Petersen said. "As a batsman you always like to get some more but I'm pretty happy with 150.
"I was a bit under pressure coming into this game not having scored runs in the series so I'm satisfied with the way it's gone."
Petersen said all three of his Test centuries have been special: his first at Eden Gardens in Kolkata and his second at Newlands in Cape Town.
"This one is also special because I had to graft hard," he said. "It's probably the hardest I've worked to get a hundred so it's right up there.
Duminy was the only player out in the first session on Sunday as South Africa added 116 runs to their overnight total of 246-2. He reached his second Test century, following his 166 in Melbourne in 2008, in 260 minutes, from 180 balls with 13 sixes.
But he was out only seven balls later for 103 when South Africa were 306-3, after adding exactly 200 for the third wicket with Petersen in 60 overs.
Petersen carried on to lunch when he already had 156 and was out soon after without adding to his or South Africa's total. His dismissal led to a mini collapse by the South Africans who quickly lost four wickets for 42 runs.
Mark Boucher (46) and Vernon Philander (29) stopped the slide and allowed South Africa to reach a position from which a declaration was tenable, with 25 overs still remaining in the third day's play and two days left.
Gillespie hastened the declaration when he dismissed Philander for his sixth wicket of the innings.
"It's nice to park up after three days of bowling," Gillespie said. "If we bowl again we bowl again but if not I'm not going to be too disappointed.
"Obviously, it's nice to get some name players out. A couple of them batted really, really well and scored big runs. But wickets are wickets for me, the more the better and to get six-for I'm really happy."