Rubel Hossain bowled Bangladesh to a thrilling three-run victory over New Zealand in the fifth ODI to complete a memorable 4-0 series win.

Having already surrendered the series, the Black Caps looked like they had done enough to pick up a consolation victory after dismissing the hosts for 174 at the Shere-e-Bangla Stadium.

But canny bowling, allied to some dismal top-order batting, put the result in the balance before Rubel closed out the win with just three balls remaining.

Shakib Al Hasan won the toss for Bangladesh but their innings never got out of first gear with most batsmen getting a start but failing to post a major score.

Opener Imrul Kayes hit 34, including two sixes and three fours, but with Kyle Mills and Daniel Vettori proving difficult to control he frequently lost partners.

Vettori pinned Imrul leg before to make it 77 for four, with Shakib taking the baton to top score with 36.

All-rounder Grant Elliott accounted for him and also picked up the dangerous Mushfiqur Rahim for 29, while Mills and Vettori each finished with three wickets.

Rubel was last man out, bowled by Mills, with 5.4 overs still remaining.

If 174 looked like a straightforward chase, the tourists soon made it look virtually impossible.

Rubel removed both openers, Brendon McCullum and Jesse Ryder, in the second over and BJ Watling was run out for a single soon after.

It was 16 for four in the sixth over, Rubel sending back Kane Williamson for a six-ball duck.

Ross Taylor fared little better, adding just three before Abdur Razzak parted his stumps to make it 20 for five.

The dependable Vettori then put on 86 for the sixth wicket in an obdurate stand with Elliott.

Vettori hit one four and one six in his 43, while the watchful Elliott (59) mustered the only half-century of the match.

Shakib dismissed his opposite number to put Bangladesh back in contention and when Elliott followed off the bowling of Suhrawadi Shuvo, the Black Caps looked in trouble.

Mills bludgeoned two sixes and two boundaries in a counter-attacking 33 but with four still needed to win the match from as many balls, Rubel ripped out his leg stump to end the resistance.