Pakistan were 107 for three at tea on the fifth and final day as their chances to win the third and final Test faded away in Sharjah on Monday.
Set a daunting 302 to win in a maximum of 59 overs, Pakistan lost Ahmed Shehzad (21), Khurram Manzoor (21) and Younis Khan (29) as they were left to score another 195 in the remaining 35 overs or bat out for a draw.
Azhar Ali (29) and Sarfraz Ahmed (seven) were at the crease.
The likely draw will mean Sri Lanka take the three-match series 1-0 after winning the second Test in Dubai by nine wickets. The first Test ended in a draw in Abu Dhabi.
Sri Lanka were dismissed for 214 in their second innings.
Left arm spinner Abdul Rehman was the pick of the bowlers with 4-56, while paceman Mohammad Talha had figures of 3-65 and Saeed Ajmal took 3-53.