Ross Taylor marked the end of his record-breaking Test career with a rare wicket to clinch victory for New Zealand over Bangladesh in Christchurch.

The veteran batsman, who made his Test debut in November 2007 and scored 7,683 runs for the Black Caps in 112 games, enjoyed a fairy tale finish.

Captain Tom Latham invited the occasional off-spinner to have a bowl as New Zealand sought the final wicket they needed to wrap up an innings win.

It was just the eighth Test innings in which Taylor has bowled, and from his third delivery he had Ebadot Hossain caught by Latham at midwicket.

A slog by the Bangladesh number 11 went skywards before Latham showed composure to gather the falling ball.

That gave Taylor a third Test wicket and figures of 1-0, although his best figures remain the 2-4 he took against India in Ahmedabad in 2010.

New Zealand, for whom Latham made 252 in a first-innings total of 521-6, won the Test by an innings and 117 runs after bowling out the visitors for 278 second time around.

After the embarrassing defeat in Mount Maunganui last time out, it meant the two-Test series ended in a draw.

Taylor told broadcaster Spark Sport: "I suppose if you bowl in those situations a bit more often, you get the wicket. It's a great way to finish.

"We needed to win this game to stay in the series. I thought we played fantastically well.

"Bangladesh put us under pressure a lot of times. It's probably a fair reflection of where the series was at.

"But I wanted to finish with the win and the guys definitely gave that to me. The way we came out and bowled and put them under pressure after posting a very good total put us in good stead.

"It was an emotional game for me, my family and friends, and the team-mates as well, but it was good to get the win."