Sri Lanka, leading Pakistan by 63 runs after the first innings, were 4-112 in their second innings at tea on the third day of the final Test in Pallekele on Sunday.
Skipper Angelo Mathews was unbeaten on 31 and Jehan Mubarak was on nine, giving the hosts a lead of 175 runs with six wickets in hand.
The tourists added six runs to their overnight score of 9-209 before being dismissed for 215 in the second over of the morning. Sarfraz Ahmed remained unbeaten on 78.
Sri Lanka had scored 278 in their first innings.
The series is tied at 1-1 after Pakistan won the first Test in Galle by 10 wickets and Sri Lanka took the second in Colombo by seven wickets.