The one-drop batsman was unbeaten on 74 but saw Babar Azam fell for 28 in the last over of the day as Pakistan finished on 266-4 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 who retired in May this year after shouldering team's batting for nearly seven years.
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 Sri Lankan three- pronged spin attack.
Veteran left-arm spinner Herath was the most successful bowler with 2-47.
When on 32, Ali also completed 5,000 Test runs in his 61st Test. He became the eighth Pakistan batsmen behind Younis Khan (10,099), Javed Miandad (8832) Inzamam-ul-Haq (8829), Mohammad Yousuf (7530), Salim Malik (5768), Misbah (5222) and Zaheer Abbas (5062) to reach the milestone.
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.
Two runs later Masood attempted a sweep shot off the wily Herath but missed the ball and was bowled round his legs.
Shafiq was given not out on a review when he was stumped off Herath on one.
It was Herath who finally dislodged Shafiq when a sharp turner caught an edge off Shafiq's bat, deflected from wicketkeeper Niroshan Dickwella's thigh to slip where Lahiru Thirimanne took the catch.
Disclaimer: No Business Standard Journalist was involved in creation of this content
You’ve reached your limit of {{free_limit}} free articles this month.
Subscribe now for unlimited access.
Already subscribed? Log in
Subscribe to read the full story →
Smart Quarterly
₹900
3 Months
₹300/Month
Smart Essential
₹2,700
1 Year
₹225/Month
Super Saver
₹3,900
2 Years
₹162/Month
Renews automatically, cancel anytime
Here’s what’s included in our digital subscription plans
Exclusive premium stories online
Over 30 premium stories daily, handpicked by our editors


Complimentary Access to The New York Times
News, Games, Cooking, Audio, Wirecutter & The Athletic
Business Standard Epaper
Digital replica of our daily newspaper — with options to read, save, and share


Curated Newsletters
Insights on markets, finance, politics, tech, and more delivered to your inbox
Market Analysis & Investment Insights
In-depth market analysis & insights with access to The Smart Investor


Archives
Repository of articles and publications dating back to 1997
Ad-free Reading
Uninterrupted reading experience with no advertisements


Seamless Access Across All Devices
Access Business Standard across devices — mobile, tablet, or PC, via web or app
