Pakistan have forged a lead at the end of the fourth day of the second Test in Dubai, thanks to an unbeaten half-century from wicketkeeper Sarfraz Ahmed.
Misbah-ul-Haq was dismissed three short of a century by spinner Rangana Herath (2-124), before a late partnership between Ahmed (67 not out) and Bilawal Bhatti (32) of 67 gave hope of staving off defeat by stretching the game into a fifth day, before the latter's dismissal.
Ahmed guided his side through the close of play and a lead of 107 with three second innings wickets in hand before rain halted proceedings.
Earlier, the tourists reduced Pakistan to 19-3 and the prospect of an innings defeat loomed large before Misbah's knock, aided by 77 from Younis Khan.
Both sides drew the first Test in Abu Dhabi last week.