New Zealand’s Kane Williamson and Martin Guptill shared a record partnership as the Black Caps beat Pakistan by three wickets with two balls to spare on Sunday, taking the one-day series 2-0.Pakistan began strongly batting first and looked set for a score over 300 but faltered late and was bowled out for 290 with 15 balls remaining in its innings.In reply, Williamson made 84 and Guptill 82 in a 159-run partnership for the second wicket – a record for New Zealand in one-day games – as the home side seemingly cruised towards victory at 210-5 in the 36th over.A heavy rain shower interrupted play for an hour, with the Duckworth-Lewis rule setting New Zealand a revised target of 263 from 43 overs; effectively 53 runs from 45 balls after the resumption.Corey Anderson was batting with out-of-form wicketkeeper Luke Ronchi after Grant Elliott was dismissed by the last ball before the rain.It fell to Anderson to decide the match and he blasted 35 from 29 balls in a key, and fortunate, contribution.When on 17, and with the match still in the balance, he clearly edged a ball from Rahat Ali to wicketkeeper Sarfraz Ahmed and should have been out with New Zealand still needing 38 runs from 26 balls. But umpire Billy Bowden judged Anderson not out and Pakistan had already used up its one appeal under the Decision Review System.Anderson struck two sixes from the next two balls from Rahat to substantially reduce the equation. He fell with seven runs still required and two fresh batsmen – Mitchell Santner and Adam Milne – at the crease.advertisementNew Zealand needed six runs from the last over and Santner bludgeoned the first ball through cover for four. But he played and missed at the next two balls with rash strokes before striking the fourth ball from Wahab Riaz to the boundary to win it.”It was a really good game of cricket,” said captain Brendon McCullum, who returned to the New Zealand side after a month-long layoff with a back injury.”We were under a lot of pressure when we had the ball in hand and at one stage the Pakistan boys were looking at scoring about 340 or 350. The way we closed off our bowling display let us take some momentum into our batting.”Then another wonderful partnership from Kane and Martin and after that it came down to a couple of moments and we got a little bit of luck in one of those moments.”Pakistan captain Azhar Ali won the toss and surprisingly elected to bat despite rain threatening, and teams normally choosing to bat second when the Duckworth Lewis system was likely to come into play.Babar Azam made 83, Mohammad Hafeez 76 and their partnership of 134 for the third wicket.After they were separated – Santner removed Hafeez at 154-3, then Matt Henry dismissed Babar Azam at 215-4 – the Pakistan innings went into decline. Wicketkeeper Sarfraz Ahmed made 41 and Shoaib Malik 32 but Pakistan fell well short of the total that seemed likely when Babar and Hafeez were together.”We played very good cricket,” Pakistan captain Azhar Ali said. “We didn’t finish off the way we wanted but we had enough runs on the board to win.”In the second half we kept coming hard as well but in the end it wasn’t good enough to get over the line.”New Zealand faces Australia in the first of thre one-day internationals in Auckland on Wednesday.