Captain Kane Williamson hit an unbeaten 70 to lead New Zealand to a four-wicket win over Pakistan in Sharjah and level their one-day series at 1-1.
Williamson stood firm during a Kiwi collapse and was still at the crease with former skipper Daniel Vettori as four leg byes saw them past Pakistan's target of 253 for victory with four overs to spare.
Pakistan were up against it from the start of their innings with Matt Henry taking two of his four wickets to reduce them to 20-3 in front of a partisan 16,000 crowd.
Ahmed Shehzad was caught behind by Luke Ronchi for a duck and when Asad Shafiq was clean bowled by Henry for only one, Pakistan were in a deal of trouble.
Mohammad Hafeez, playing as a specialist batsman after being banned from bowling earlier this month, started to rescue the innings with Haris Sohail (33), the pair putting on 77 for the fourth wicket before Corey Anderson struck.
But Hafeez stayed strong and found a willing partner in captain Misbah-ul-Haq as they added a further 66 before the opener's stay was finally ended by Henry on 76, Tom Latham pouching the catch.
Misbah made it to 47 before becoming Henry's fourth victim - he ended with a fine 4-45 - and Sarfraz Ahmed and Shahid Afridi added some vital runs to at least ensure Pakistan would set a reasonable target, their innings coming to an end with nine balls wasted.
But their bowlers failed to make any early breakthroughs as Dean Brownlie and Anton Devcich went about their business in calm fashion.
They put on 103 for the first wicket before Brownlie fell for 47 - bowled by Afridi - to start an enthralling 10-over spell when their hopes of victory dimmed.
Devcich was run out for 58 before Ross Taylor and Latham fell quickly, and when Anderson was bowled by Sohail, who took 3-48, they were suddenly struggling on 167-5.
But WIlliamson knew their scoring rate early in the innings had put them in good position and he and Ronchi stemmed the flow of wickets in a partnership that ended up adding 58.
Ronchi became Afridi's second victim for 36 but Vettori proved a more than capable aide for Williamson and they secured victory off the last ball of the 46th over, the veteran spinner surviving a review on a reverse sweep a ball after Ahmed had dropped WIlliamson.
The teams play three more 50-over matches, with the next game taking place in Sharjah on Sunday - the final two games will be played in Abu Dhabi next week.