A spot in the World Test Championship final is a big motivation which keeps pushing the team to give their best, New Zealand captain Kane Williamson said after beating Pakistan in a thrilling first Test on Wednesday.

Pakistan fought hard in the match and it appeared they might walk away with a draw but lost six wickets for 31 runs to lose the Test by 101 runs.

Set a target of 373 to win, a 165-run stand for the fifth wicket by Fawad Alam (102) and Mohammad Rizwan (60) kept Pakistan in contention until late in the final session. Then lower-order batsmen Shaheen Afridi and Naseem Shah blocked for more than seven overs before Naseem was sensationally caught and bowled by Mitchell Santner.

Watch: Mitchell Santner’s spectacular one-handed catch helps NZ clinch a thriller against Pakistan

New Zealand are placed third in the WTC table and the top two teams will fight it out for the championship.

“Absolutely, we want to play the World Test Championship final, and we saw it in the final session today, when there was that carrot in mind,” said Williamson at the post-match presentation.

“But in Tests, you know that it’s all about going moment by moment, and that’s what you play with. We did make the declaration that if the wicket doesn’t deteriorate, it would have given them a chance. They had some positive players at the crease, and some more to come.”

“For us it was trying to win at all costs. Going into that last session we still clearly had that opportunity, as did Pakistan, but in the context of the Test championship losing while trying to win was still a better bet than anything else. It was great coming away with the result and the excitement of finishing so late in the piece obviously adds to that,” he added.

Williamson said WTC means “you give yourself a chance to win a game, but also lose it.”

“It gave the viewers that spectacle, with three possible results going into the final session. I think we saw similar characteristics on this wicket when we played against England.

“We are playing in our country, but on surfaces which are varied. With the wind and the sun, it started to offer a bit more,” he said.