Pakistan leg-spinner Yasir Shah claimed his third five-wicket haul of the series but Sri Lanka took the upper hand on day two of the third and final Test by restricting the visitors to 209 for nine at Pallekele.
After Azhar Ali (52) showed some fight in an otherwise top order capitulation, Sarfraz Ahmed remained not out after a gutsy 72 to take Pakistan past the 200-mark in the series-deciding contest.
Imran Khan was scoreless at the other end, having survived six balls with Pakistan still 69 runs behind Sri Lanka's first-innings total of 278.
In Pictures: Batting for the 'Last Male Standing'
Intermittent rain allowed only 68 overs on the second day at the Pallekele International Cricket Stadium.
Resuming on 272 for eight, the hosts put on six runs before losing their last two wickets inside four overs. Shah (5-78) dismissed Nuwan Pradeep as Sri Lanka's last five wickets could only add 30 runs to the total.
Having claimed 22 victims in five innings, Shah will fancy his chances of surpassing Australia spin great Shane Warne's record haul of 26 wickets in a series by a visiting bowler in Sri Lanka.
His team, however, found themselves deep in trouble after losing three wickets in the morning session and could not really recover.
Dhammika Prasad (3-78) and Pradeep (3-26) were the pick of the bowlers for the hosts.
Sri Lanka 278 all out (Karunaratne 130, Shah 5-78)
Pakistan 209-9 (Sarfraz 72*, Prasad 3-78)