The second test duel between Pakistan and New Zealand continued into the fourth day with the visitors making early progress with three wickets for 31 before Pakistan fought back with an unbeaten 64-run partnership for the 10th wicket just before lunch with the score 376 for nine.
Wicketkeeper-batsman Sarfraz Ahmed was the redeemer, making his third test century in his 12th test. He applied a controlled, aggressive approach, gulping up runs as the tail faltered on his way to 108.
He looked every bit a batsman with an average over 40 coaxing his partners through the final throes.
Rahat Ali gave him the most support with eight.
Ahmed, who made a century against Australia last month, has been not out in the teens in three subsequent innings. His form didn't betray him here with the opportunity to pounce on a New Zealand attack vulnerable to complacency at nine down.