Abu Dhabi: Azhar Ali once more rescued Pakistan's batting with a fighting half-century on the third day of the first Test against Sri Lanka here on Saturday.
The one-drop batsman was unbeaten on 74, but saw Babar Azam fall for 28 in the last over of the day as Pakistan finished on 266 for four on a Sheikh Zayed Stadium pitch which has started to assist spinners.
Pakistan still trail the Sri Lankan first innings total of 419 by 153 runs with six wickets intact.
Pakistan had pinned their hopes on Ali in the post Younis Khan and Misbah-ul Haq era.
A cautious Ali made sure Pakistan did not concede a big lead in the first innings, having hit only one boundary in his 26th Test half-century.
In all, Ali has so far hit three boundaries during his 297 minutes of batting. He added 79 for the third wicket with Asad Shafiq, who made 39 to take the fight to the Sri Lankan three-pronged spin attack.
Veteran left-arm spinner Herath was the most successful bowler with two for 47.
When on 32, Ali also completed 5,000 Test runs in his 61st Test. He became the eighth Pakistan batsmen behind Younis (10,099), Javed Miandad (8832) Inzamam-ul Haq (8829), Mohammed Yousuf (7530), Salim Malik (5768), Misbah (5222) and Zaheer Abbas (5062) to reach the milestone.
But it was the opening pair of Shan Masood and Sami Aslam who set the platform for a big total by putting together a solid 114-run opening stand after they resumed at 64 without loss.
Sri Lanka, however, hit back by removing both openers in the space of two runs.
Aslam, recalled after being dropped from the West Indies tour on disciplinary grounds earlier this year, was trapped leg-before by off-break bowler Dilruwan Perera. He hit four boundaries in his seventh Test half-century.