New Zealand 171 (Vettori 55*, Shakib 7-36) and 317 for 7 (Redmond 79, Vettori 76, Flynn 49) beat Bangladesh 245 (Mehrab 83, Mushfiqur 79, Vettori 5-59)and 242 (Shakib 71, Vettori 4-74) by three wickets
Scorecard and ball-by-ball details
How they were out
A match that hung in the balance until tea on a dramatic final day swung New Zealand's way as their captain, Daniel Vettori, played a determined innings to push his team over the line and to a three-wicket victory.
With New Zealand needing just 36 runs in the last session with five wickets in hand, the match seemed all but over. But, as has been the case throughout this match, Bangladesh saw a glimmer of hope when Vettori left the middle after a well-compiled 76, including seven boundaries.
Vettori became Abdur Razzak's third scalp when he tried to slog-sweep the left-arm spinner to the boundary. With only 19 runs needed, Vettori looked to get the runs as quickly as possible. It was the first false shot he played in the entire match.
The experience and skill he showed after coming out as a nightwatchman at the fall of Jesse Ryder yesterday was vital in his team completing the victory. He was able to control the innings from the middle and help his batting partners in a tense environment that most of them were not used to.
Earlier in the day, the match could have gone either way. The visitors went to lunch at 212 for 4 after the fall of Aaron Redmond for 79 and Ross Taylor for 9.
In the second over after the break, Brendon McCullum was adjudged lbw to Abdur Razzak by umpire Asoka de Silva. Replays showed the ball clearly pitched outside the leg stump and would not have gone on to hit his stump.
That early loss of McCullum brought Daniel Flynn to the wicket with the match in the balance at 216 for 5. The visitors still needed another 101 runs.
The nerves began to set in for both teams. Vettori and Flynn went into defensive mode, making sure they kept their wickets in tact. Earlier New Zealand moved from 150 to 200 off 93 balls, but the next 50 took 185 deliveries.
To their credit, the spin twins of Razzak and Shakib Al Hasan bowled well in this period, offering very few opportunities for New Zealand to score. At one stage, 23 overs were bowled without a boundary being hit.
As the partnership between Vettori and Flynn progressed, the Bangladesh fielders visibly drooped, as it had done through the match in response to a threatening partnership. This was not helped by the defensive fields employed by their captain, Mohammad Ashraful, who deployed fielders on the boundary when they would have been better cutting off singles or placed in attacking positions.
The partnership between Flynn and Vettori reached 65 by tea with Flynn on 29 and Vettori 69. Shakib began to find some of the form he showed in the first innings, but received little help from the pitch.
After tea, New Zealand again looked comfortable, hitting three boundaries in the first four overs. That took the pressure off, but the dismissal of Vettori saw Flynn and Jacob Oram show signs of jitters.
When the scores were tied, Flynn was caught behind off Shakib, giving the first-innings hero his second wicket. He joined Vettori in claiming nine for the match. Razzak also bowled well, finishing with 3 for 93. Flynn made a gritty 49, hitting six boundaries in126 deliveries.
Oram was joined by Kyle Mills, who scored the winning run to end a dramatic match that will not be remembered for its skills level but because it could have gone either up until tea on the final day.
Vettori was deservedly named the Man of the Match for his nine-wicket haul and his two half-centuries. His all-round performance proved the difference between the sides. The teams will now move to Dhaka, where the second Test begins on Saturday.
Following the victory, the New Zealand players did not show the emotion they usually do after a Test win. They may have been more relieved than excited as before the series they did expect to win both the Tests. They would also have been exhausted after the heat and humidity of the last five days.
Bangladesh were quiet and sombre after a match they had come so close to winning but which slipped away from them on the last day. However, this disappointment was evident well before the end of the game. Their lack of experience in the big matches came through. It was as if they felt beaten at times, even though a wicket or two would bring them right back into contention.
Apart from the Vettori factor, New Zealand's grit and determination helped them reach their target. What they lacked in skill on turning pitches, they made up for by never giving up.
Peter Burdon is a cricket writer based in New Zealand