Pakistan salvaged a draw in the second Test after New Zealand set a challenging target of 261 off 72 overs on the back of a brilliant hundred from Ross Taylor in Dubai on Friday.
Pakistan's four early wickets had set up the possibility of all results at tea but in the end Pakistan fell 65 runs short when bad light finished play five overs early.
Asad Shafiq scored 41 not out and Sarfraz Ahmed 24 as Pakistan finished at 196-5 which kept their 1-0 lead in the series intact.
It was an exciting finish before an 8,000 holiday crowd who anticipated a Pakistani win after New Zealand captain Brendon McCullum had sportingly declared his second innings at 250-9.
That was made possible after Ross Taylor notched a brilliant 104 for his 12th Test century.
Younis (44) and Shafiq lifted Pakistan from a precarious 75-4 after Trent Boult had dismissed Shan Masood (40) and skipper Misbah-ul Haq (nought) in his successive overs.
Pakistan, needing 130 in the last 20 overs, picked up the tempo with Shafiq hitting two boundaries off Mark Craig but the off-spinner derailed the chase when he dismissed Younis with a turning delivery which rose on the batsman and the ensuing edge was well taken in the slip.
Younis hit three sixes and two boundaries in his 84-ball knock.
Boult finished with 2-12 while Craig had 2-66.
Pakistan won the first Test by 248 runs in Abu Dhabi last week.
The third and final Test starts in Sharjah from November 26.
Pakistan had lost opener Taufeeq Umar for four in the second over to Tim Southee before Masood and Azhar Ali (24) put on a solid 62 for the second wicket.
Ali then hit a Craig full toss straight into the hands of covers before Boult trapped Masood leg-before and had Misbah caught behind off a beautiful delivery.
Masood was shaping well during his 95-ball knock, hitting two sixes and a boundary.
Earlier Taylor anchored the New Zealand innings.
Taylor, who had just 31 runs in the three previous innings of the series, batted with authority during his 200-minute stay at the crease studded with 12 boundaries.
New Zealand, resuming at 167-6, looked for quick runs which came once Taylor reached his hundred with a single off seamer Ehsan Adil. It took him 129 balls to reach the three-figure mark.
Leg-spinner Yasir Shah, who finished with his first five-wicket haul for figures of 5-79, removed Taylor and Mark Craig (34) in the same over.
Craig holed out in the deep while Taylor was beaten by a sharp turning delivery and was smartly stumped by Sarfraz Ahmed.
Southee hit Zulfiqar Babar (4-96) for three towering sixes before he was caught in the covers before McCullum declared.