New Zealand are in a healthy position to take control of the opening Test against South Africa after closing day two at 177-3.
The Black Caps impressed with the ball, limiting the imposing Proteas to a total of 308 at the University Oval in Dunedin on Thursday.
New Zealand maintained that form with the bat thanks to captain Kane Williamson (78 not out) and Jeet Raval (52) as the Kiwis reached stumps 131 runs adrift of the tourists.
The Black Caps, though, were not without their issues and scares in the middle.
Opener Tom Latham fell cheaply, dismissed by Vernon Philander (1-37) for 10, while Ross Taylor was forced to retire hurt on eight due to a calf injury.
Henry Nicholls (12) then breathed a huge sigh of relief after being involved in an embarrassing mix up with Williamson, who was forced to turn back well out of his crease. Fortunately for the skipper, a desperate lunge spared New Zealand's blushes.
South Africa did get a late boost, Hashim Amla producing a stunning catch at slip to oust Nicholls off the bowling of Keshav Maharaj (2-57) and halt the Kiwis heading into the third day.
-- BLACKCAPS (@BLACKCAPS) March 9, 2017
Dean Elgar only added 12 to his overnight century as South Africa were restricted, losing 56-6 to end their innings.
Resuming at 229-4, Elgar - who posted his seventh Test ton on Wednesday - was the first wicket to fall for a career-best 140 after glancing a top-edge to BJ Watling off Neil Wagner (3-88).
New Zealand's sustained period of accuracy during the opening session troubled the Proteas as Quinton de Kock (10) and Temba Bavuma (64) were sent back to the pavilion in quick succession.
Jeetan Patel (2-85), who dismissed De Kock in each of the final two one-day internationals, got the better of the South African again, having forced him to spoon a catch to Wagner.
After bringing up his first half-century in eight innings since the Hobart Test against Australia last year, Bavuma - the last recognised batsman who started the day unbeaten alongside centurion Elgar - fell victim to Trent Boult (4-64).
With South Africa 279-7, Philander added some valuable runs but he had little support from the rest of the tail as Maharaj and Kagiso Rabada were cleaned up by Boult and Patel.