Sarfraz Ahmed hit a fighting century to help Pakistan reduce New Zealand's lead on the fourth day of the second Test in Dubai.
The right-handed batsman scored an unbeaten 111 for his third century -- all this year -- to take Pakistan to 392-9 at lunch, trailing by just 11 runs on New Zealand's first innings total of 403.
Sarfraz added a record 80 runs for the unfinished tenth wicket stand with Rahat Ali (16 not out) and even a 30-minute extension could not get New Zealand the last wicket.
Sarfraz hit three boundaries in one Mark Craig over and then two more off leg-spinner Ish Sodhi to come within four runs of his hundred.
He then cut seamer Tim Southee towards deep point for his 15th boundary to complete the three-figure mark off 153 balls, the first Pakistani keeper-batsman to score three hundreds in a year.
He ran a full circle in jubilation, thumped his bat in the air to warm applause from his team-mates in the dressing room.
He has so far hit 16 fours in his 184-ball knock which evened the balance of the match.
It was Sarfraz, 28 overnight, who anchored the batting after Pakistan resumed the day on 281-6.
Paceman Tim Southee (3-67) removed Yasir Shah in the third over of the day, caught behind for two and just two runs later Trent Boult (2-69) trapped Ehsan Adil leg-before for nought, leaving Pakistan in danger of conceding a big lead.
But Sarfraz added an invaluable 25 for the ninth wicket with Zulfiqar Babar (five) and then frustrated the Kiwis, bettering the tenth wicket stand record against New Zealand of 65 which Salahuddin Ahmed and Mohammad Farooq set in Rawalpindi in 1965.
Pakistan lead the three-Test series 1-0 after winning the first match by 248 runs in Abu Dhabi last week.