Pakistan lost both their openers by the score of 40 before star batsman Younis Khan was run out off the last ball of the session as the tourists went to lunch on 45-3.
Left-hander Shan Masood scored 13 in his first appearance in the series when he was leg-before to Dhammika Prasad, a decision that was reviewed by the batsman and overruled by the TV umpire.
Ahmed Shehzad made a fluent 21 when Nuwan Pradeep, brought in first change in place of Suranga Lakmal, had him caught behind by Dinesh Chandimal with his third delivery.
Azhar Ali was unbeaten at lunch on six.
Leg-spinner Yasir Shah claimed another five-wicket haul as Sri Lanka added six runs to their overnight score of 272-8 before they were dismissed within 20 minutes of the start.
Tharindu Kaushal was leg-before to left-arm seamer Rahat Ali for 18 and last man Pradeep fell in the same fashion to Yasir without scoring.
Yasir finished with 5-78, joining his idol Shane Warne as the only overseas bowlers to claim five or more wickets in an innings three times during a Test series in Sri Lanka.
The 29-year-old, who hails from the Khyber region of north-west Pakistan, has already grabbed 59 wickets in a 10-Test career which began in October last year.
