Captain Kane Williamson struggled to fathom how the Wellington Test escaped so quickly from New Zealand's grasp, and he could barely hide his frustration that spin was central to their demise.

Having recovered on the opening day to post 268 - on the back of Henry Nicholls' maiden Test century - New Zealand had South Africa 94 for 6 shortly before lunch on the second. From there, however, the match turned on a 160-run stand between Quinton de Kock and Temba Bavuma followed by a last-wicket bolstering partnership of 57.

New Zealand were five down before the deficit was erased and their last five wickets collapsed for 16 runs in the final session of the third day as Keshav Maharaj claimed a career-best 6 for 40.

"To see it slip away so quickly, today in particular but also back end of yesterday, the frustrating part for us is when you play a side like South Africa, and you do have them under pressure you have to keep them there," Williamson said. "That's the challenge and you have to do it for a long period of time, and if you don't, they can change the shape of the match quite quickly. We certainly let it slip very quickly and it went bad quickly."

Williamson was critical of how his batsmen handled South Africa's spinners on a surface "not offering a lot of turn". Maharaj claimed eight in the match to take his series tally to 13 at 13.92 - the best tally for any bowler - and JP Duminy nipped in with four in New Zealand's first innings to stymie their recovery. However, Williamson did not believe they had been caught out by the pre-series talk of the pace attack South Africa would bring to their shores only to be gazumped by the spinner.

"I guess you don't expect to see much spin here at the Basin when the wickets are a bit green and taking a bit of movement for seamers," Williamson said. "Often the spinner's role is to hold up an end into the wind. For them to take 12 wickets is disappointing.

"Credit to them, they did bowl well. But on a surface I thought more suited to the seam bowlers, to lose that many wickets to spin, in the first innings in particular when the ball wasn't spinning, is something we need to address moving forward," he added. "We spent a bit of time in India when it went square and showed better application than we have in this match. We do need to play it hell of a lot better."

New Zealand are coming to the end of a busy home season - which has included visits by Pakistan, Bangladesh and Australia before South Africa, plus a quick trip across the Tasman - and before that they had overseas tours to Zimbabwe, South Africa and India which began in August. Williamson, though, wanted to believe this performance was a bad day, albeit a "very, very bad day", rather than signs of fatigue. "You're in the moment and giving it everything. We are trying to look at it as a bad day but it was a huge turn in the match," he said.

After dusting themselves down - and they have two extra days to do that - New Zealand will have to work out their response in Hamilton. The pitch is expected to take turn - it did during the two one-day internationals - which at the start of the series may have been seen as New Zealand's chance to ambush South Africa, who have since supplemented their squad with offspinner Dane Piedt. However, the success of Maharaj means he'll go there full of confidence having exploited a slow surface in Dunedin and one without huge assistance in Wellington.

Mitchell Santner, the left-arm spinner, could return to the line-up while legspinner Ish Sodhi may be added to the squad when it is named later in the week. There will also be hopeful glances towards the fitness of Ross Taylor and Trent Boult, the former's absence the bigger loss despite the maiden Test hundred for Nicholls and Jeet Raval's battling 80 in Wellington.

"It's the final game of the summer and it's important we do get back on the horse very quickly," Williamson said. "Will try and look at it as a bad day, but it is a bit of a blow really."

Andrew McGlashan is a deputy editor at ESPNcricinfo