Fast bowler Naseem Shah and leg-spinner Yasir Shah claimed three wickets each as Pakistan bowled out Sri Lanka for 378 on day two of the second Test on Monday.
Sri Lanka resumed at Galle on 315-6 in former captain Angelo Mathews' 100th Test and wicketkeeper-batsman Niroshan Dickwella added nine from his overnight total before Naseem sent him back for 51.
His bouncer to debutant Dunith Wellalage saw the left-hander caught at second slip for 11 after attempting to evade the ball, which took his glove.
Ramesh Mendis made a useful cameo of 35 before being bowled by Yasir, who took two wickets to wrap up the Sri Lankan innings in the morning session.
Opener Oshada Fernando (50), Dinesh Chandimal (80) and Mathews (42) hit key knocks on Sunday after the hosts, who trail the two-match series 1-0, elected to bat first.
A 92-run start by the openers, followed by a fourth-wicket stand of 75 between Chandimal and Mathews, lay the foundations for the total on a pitch expected to turn big from day three.