Mahmadullah strode out to the crease but four balls later both batsman - and the NZ XI - were back in the sheds as the heavens opened with Bangladesh on 63 for 2 after 11 overs.
After a two hour rain delay, both sides made their way back out to the middle to continue the now 43-over match.
Sarkar and Mahmadullah settled back into their work before Henry Shipley (1 for 28) had Sarkar spoon one to Ben Smith at mid-on for the simplest of catches.
Shakib Al Hasan joined Mahmadullah in the middle as the pair put on Bangladesh's second half century partnership before the latter retired on 43.
Al Hasan (23) followed him back to the pavilion shortly after, but not of his own accord, lapping a shot straight to fine leg off the bowling of Shawn Hicks (2 for 30).
Diminutive wicket keeper Mushfiqur Rahim (45) endeavoured to up the scoring rate, highlighted by an audacious scoop shot for six off the bowling of Hicks.
Bangladesh was going along comfortably before another wicket to Hampton and a direct hit from Ajaz Patel and the NZ XI were back in it with Bangladesh at 220 for 6.
Bangladesh lost a couple more wickets to end their shortened innings on 245 for 8, setting NZ XI a good chase.
NZ XI would have been hoping for a better start to the second innings as Ryan Duffy was strangled down the leg side off Mustafizur Rahman for just four in the second over.
They consolidated after that through Ben Smith (50) and Bharat Popli, who put on 88 before Smith was bowled by Al Hasan.
Things began to unravel as Al Hasan showed his class.
He had Popli caught at short mid-wicket by Tamim Iqbal and gave essentially an instant replay three balls later to dismiss NZ XI captain Cole McConchie for a duck, putting the New Zealanders at 108 for 4.
A terrible run out to dismiss Ken McClure (10) had NZ XI under the pump at 127 for 5.
Ben Horne was holding the fort at the other end and combining with Henry Shipley, they gave the NZ XI a chance at victory.
But then Shipley fell for 24 and left NZ XI needing 46 from seven overs.
However Horne (60 not out off 53 balls) was still at the crease and, pairing with Hampton (29 not out off 21 balls), saw them home in the penultimate over for an unlikely three wicket victory to the delight of the Whangarei crowd.
Bangladesh will need to improve ahead of their first ODI against the Black Caps at Hagley Oval on Boxing Day.