The New Zealand offspinner William Somerville struggled to contain his emotions after playing a series-winning hand on Test debut following a "long road" to international cricket that has taken him to Australia and back before the call-up came.

Somerville was a late addition to the Test squad when legspinner Todd Astle was ruled out with injury and had to wait for the deciding match for his chance with Ish Sodhi having been preferred for the first two Tests. He went on to claim the fourth-best figures by a New Zealand bowler on debut - 7 for 127 - slotting in just behind team-mate Ajaz Patel who claimed 7 for 123 in the opening match of the series which New Zealand won by four runs.

Somerville, who was released from his New South Wales contract earlier this year when offered the encouragement that international honours could come his way across the Tasman, also contributed a 99-ball 12 in the first innings to help BJ Watling stretch New Zealand's total.

With the ball he claimed 4 for 75 in the first innings, helping spark Pakistan's collapse from 286 for 3 to 348 all out, then added three wickets in the second innings including two in two balls to remove Haris Sohail and Asad Shafiq.

"It's pretty incredible really, I was extremely emotional coming off the field, realising that we've won the fixture," he said. "Obviously nice to be contributing with the bat and ball slightly, it's just amazing. It still feels like a dream, I'm still pinching myself. Incredibly proud, and proud to have won for the Blackcaps.

"That's why I was so emotional after the game I think, it's been a long road. I've got my family back home and pretty excited to see them, give my kids a hug and see my wife. The sacrifices they've made for me have been amazing, and I'm extremely grateful for that.

"It's something we'll never forget. Incredible feeling to win over here in UAE, not many teams have done it. The Black Caps haven't won away against Pakistan since 1969 and that's something we talked about before this game, and we got it done. Amazing."

New Zealand were facing defeat when they were four down in their second innings and still 14 runs behind, but a magnificent stand of 212 between Kane Williamson, who scored 228 runs across both innings, and Henry Nicholls allowed them to dictate the pace of the game on the final morning as they set Pakistan 280 in 79 overs.

"Especially as a batter, you always want to have meaningful contributions in a team win. But for it to be in a series decider and in a series-winning game, it's pretty awesome," Nicholls, who made his first Test century away from home, said. "It's great to bat with Kane, the way he played and led from the front for us was pretty awesome.

"To give up a deficit of 74 in the first innings, the way the bowlers worked to make it only 74 was huge for us in the context of the game. We took a lot of confidence from the way we won that first Test being behind as well in that first innings.

"Someone like Will Somerville to come in, and in his first Test match he bowled the way he did, Ajaz Patel in his third Test - it's testament to them as bowlers and players, but also the group and the environment we've created here. It's something that we're going to really enjoy, be humble but also really proud of."

New Zealand now head home to take on Sri Lanka in a two-Test series before Christmas followed by a return to white-ball cricket then a three-Test series against Bangladesh in March. The series win over Pakistan follows their 1-0 victory at home against England earlier this year and the next 12 months gives the side a chance to create a legacy for themselves with series against England, Australia and India to follow.