(Reuters) - Kane Williamson hit a brilliant 123 as New Zealand staved off Pakistan's spirited challenge to eke out a series-levelling seven-run victory in the fourth one-day international in Abu Dhabi on Wednesday.
Williamson's fourth ODI century helped New Zealand post 299 for five but Younus Khan hit 103 and Shahid Afridi blasted 49 runs off 25 balls as Pakistan looked very much in the hunt before eventually finishing on 292 for eight.
There was uncertainty over whether the match would be played following the attack by Taliban gunmen on a school in Peshawar on Tuesday that killed at least 132 students.
It eventually got underway with players and match officials wearing black armbands and observing two minutes' silence before Williamson won the toss and decided to bat at the Sheikh Zayed Stadium.
The decision was soon vindicated by the 81-run opening stand between Martin Guptill (58) and Dean Brownlie (42) that gave the Kiwis a perfect start.
Pakistan captain Afridi broke the partnership when Umar Akmal took a diving catch at short midwicket to dismiss Brownlie.
Sohail Tanvir dismissed Guptill but stand-in captain Williamson led from the front, adding 63 runs with Ross Taylor (26) and 72 with Tom Latham (14 not out) as he completed his century in 92 balls.
New Zealand hit 91 runs off the last 10 overs and finished just shy of the 300-mark as Mohammad Irfan ended Williamson's 105-ball knock, which included 12 boundaries, with the final delivery of the innings.
Pakistan lost opener Ahmed Shehzad for no score in the first over of the innings and looked in trouble at 82 for four but Younus added 91 runs with Akmal (29) and 66 with Afridi to revive the chase.
Afridi fell in the 44th over, leaving Pakistan needing 62 runs off 41 balls but Daniel Vettori then sent down a tight over in which he also dismissed Younus.
Down the order, Anwar Ali scored 20 not out from 13 balls but Pakistan could not score the 16 runs they needed off the last over to seal the series they led 2-1 going into the contest.
Both teams stay put in Abu Dhabi for the fifth and final match on Friday.
Reporting by Amlan Chakraborty in New Delhi; editing by Toby Davis