Asad Shafiq (10) was batting with Ali after Pakistan lost two wickets in the morning session to reach 244 for four at the break.
Ali hit four boundaries in his 228-ball knock, displaying perfect temperament at the P Sara Oval.
Resuming on 171 for two, the visitors were lucky when Sri Lanka stumper Dinesh Chandimal did not go for the catch after Ali had edged Dhammika Prasad. Kumar Sangakkara dived to his left from first slip but could not pouch the ball either.
For Sri Lanka, who are pushing for a series-levelling victory, skipper Angelo Mathews made the breakthrough when he induced Younus Khan (40) into edging a delivery behind.
Prasad frequently troubled the Pakistani batsmen with his hostile display of pace bowling but was largely unlucky.
The 32-year-old right-arm paceman finally tasted success when he trapped Pakistan captain Misbah-ul-Haq (22) leg before. The batsman reviewed the decision but could not get the verdict overturned.
Bundled out for 138 in their first innings, Pakistan put up a much-improved performance in the second to leave the match delicately poised. – Reuters
Original source: Composed Ali leads Pakistan’s reply