Martin Guptill New Zealand ICC Cricket World Cup 2015
New Zealand opener Martin Guptill celebrates his century in the ICC Cricket World Cup 2015 match against BangladeshReuters

New Zealand huffed and puffed their way past Bangladesh to keep their perfect record in this ICC Cricket World Cup 2015 intact, only just.

The crowd at Seddon Park in Hamilton were treated to a cracker of a contest, with Bangladesh, yet again, showing they are a match for any team by putting in a performance of note.

Mahmudullah (128, 123b, 12x4, 3x6) slammed his second straight century to drive Bangladesh to a competitive 288/7 in their 50 overs, a target which New Zealand really struggled to get to, despite a brilliant century of his own from Martin Guptill (105, 100b, 11x4, 2x6) , with the home team needing some slam-bang lower-order batting to eventually sneak home.

The win for New Zealand doesn't change anything from their perspective as they had already sealed top place in Pool A, but for Bangladesh, it means, a quarterfinal at the MCG against India unless Australia lose by a big margin to Scotland on Saturday.

Brendon McCullum was warned of a trial by spin ahead of this match, and, unfortunately for New Zealand and their fans in the stadium, he could not get an acquittal as Shakib Al Hasan produced that false stoke with the ball looping straight to Soumya Sarkar at long-off.

With McCullum unable to blitz New Zealand to a start early, New Zealand needed their other opener to make a score of note, especially after their best batsman Kane Williamson fell in the same over – the fifth -- as McCullum as Shakib thrived donning the captaincy hat in the absence of Mashrafe Mortaza.

Guptill answered the call pretty well, notching up some much-needed runs for himself and his team, with Ross Taylor giving him company in a crucial 131-run partnership. While Guptill was at his flowing best, hitting boundaries with ease, Taylor struggled and continued to struggle for any kind of rhythm throughout his knock of 56 (97b, 5x4).

As Taylor struggled to rotate the strike, Guptill needed to up his game and the right-hander constantly played at a strike rate of well over a 100, which in turn ensured the required run rate would not jump too high. The opener was a little lucky to get away with a few things, with an early lbw appeal going his way, while he could have easily edged one through to the keeper, with the ball just tailing away and going past the dive of Mushfiqur Rahim.

There was more drama as Guptill cramped up on 99, and he needed treatment before he could complete his century. The right-hander would not last too long after that, however, with Shakib (8.5-1-55-4) again coming up trumps and from there Bangladesh saw their chance open up.

Grant Elliott came in and played a few really good shots, but could not stay long enough to make the game safe, before Taylor finally fell, lbw to Nasir Hossain.

New Zealand were left with 70 runs to score from 52 balls at Taylor's wicket, with their last recognised batting pair of Corey Anderson, who got off the mark with a ridiculous straight six, and Luke Ronchi at the crease.

The two batsmen are extremely attacking players and boundaries flowed easily, before Ronchi went for one too many, and that too off Shakib to make Bangladesh the favourites to win the game.

With 42 needed off 32 balls, it was all down to Anderson, even if Daniel Vettori is more than capable with the willow. Anderson (39, 26b, 3x4, 3x6) pummelled a couple for boundaries to bring the target down to 20 from 17, but yet another poor shot saw the wicket column go to 7, with the New Zealand tail left with the job of completing the game.

No problem then, a beautiful six over long-off from Vettori in the last ball of the 48th over, and then a six and a four from Tim Southee off Shakib in the 49th and the match was done.

Earlier, Bangladesh had Mahmudullah to thank for another gem of an innings, with the right-hander's second-straight century of the World Cup taking them to a "we can defend this" total.

Mahumudullah came to the crease at a tricky time again, with Bangladesh losing their openers for just 27 runs, and that too with 52 balls bowled, but such is his form at the moment that it mattered little.

Great credit must also go to Soumya Sarkar (51, 58b, 7x4), who allowed Mahmudullah to take his time in the middle, with the youngster scoring the first half-century of his career. The innings might have tailed off, though, following Sarkar's wicket, with Shakib and Mushfiqur not quite able to find their groove, but Mahmudullah held one end up brilliantly as Sabbir Rahman came to the party as well.

At 182/5 in the 40th over it could all have easily gone pear-shaped for Bangladesh, but Mahmudullah stepped up a gear in stunning fashion, with Sabbir striking a brilliant 23-ball 40 (5x4, 2x6). Bangladesh scored 104 runs in the final ten overs, to take them to that big total, a total which they very nearly defended.

Get the Full Scorecard of the Match HERE