|Umar Gul bowled Vettori for one and trapped Brent Arnel for a duck to set up a hat-trick opportunity [GALLO/GETTY]
New Zealand set Pakistan a final day target of 274 runs to win the second Test and secure a 2-0 series victory.
Kiwis were all out for 293 in their second innings late on Tuesday, the fourth day of the second Test against Pakistan.
Pakistan's Umar Gul ran through New Zealand's lower order, taking two wickets in just two balls, as the hosts lost four wickets for seven runs late in the day's proceedings.
However, Gul was denied a hat-trick when New Zealand's last man, Chris Martin, kept his delivery out with a French cut behind square to the enormous cheers of the small crowd at the Basin Reserve.
Tim Southee then smashed two sixes as he tried to push the lead closer to 300, before Gul had Martin caught behind for one.
Southee ended 22 not out, while Gul finished with four wickets for 61.
"It's set up for what could be a great day of Test cricket to finish off a Test match," said Brendan McCullum, New Zealand opening batsman.
He scored 64, putting up an opening stand of 120 with Martin Guptill.
McCullum's knock came to an end shortly after lunch, when he was caught by Tanvir Ahmed off Rehman as his lofted shot came off the toe end of his bat.
It was only the second century-opening stand by New Zealand since 2004.
Ross Taylor went on to score 52 before he was trapped in front by Gul, and New Zealand struggled to build on that solid foundation.
Gul then bowled Vettori for one and trapped Brent Arnel for a duck to set up the hat-trick opportunity.
Rain interrupted play for 23 minutes in the final session, forcing the players off the field.
New Zealand were were looking to score some quick runs but were stopped in their tracks when Jesse Ryder was bowled for 17 on the first delivery after the rain delay.
He failed to play a shot at a straight ball from Mohammad Hafeez, Pakistan's part-time off-spinner.
James Franklin also fell to Hafeez at six when he edged a ball to Younus Khan.
The hosts lost two quick wickets just before tea when Kane Williamson nicked a Tanvir delivery to Akmal for 15 with the score on 166.
He was immediately followed by Guptill, who was trapped in front by Rehman, for 73.
Pakistan had been bowled out for 376, with a first-innings lead of 20 runs, late on Monday.
Pakistan are leading the two-match series 1-0 and are seeking their first Test series victory since 2006. They are unbeaten in seven previous tests at the Basin Reserve.
The Test really could not have been set up for a more exciting finish as the hosts will aim to take ten wickets to level the series 1-1.
On the other hand, Pakistan will be keen to either achieve the winning total or at least bat out the final day to secure a draw, still ensuring a series victory.