Pakistan's bowlers hurt Sri Lanka with key strikes including the wicket of Angelo Mathews in his 100th Test as the tourists tried to wrestle back the initiative on day three of the second Test on Tuesday.
Hosts Sri Lanka reached 109-4 at tea in Galle, a lead of 256 runs, with Dinesh Chandimal on 16 and skipper Dimuth Karunaratne -- batting despite lower back pain -- at the crease on four.
Spinner Ramesh Mendis had claimed a five-wicket haul to help bowl out Pakistan for 231 in the opening session.
The hosts then slipped to 59-3, before Mathews, who made an attacking 35 with four fours and a six, and Chandimal put on 41 runs in their attempt to steady the innings.
Agha Salman got Mathews out caught behind for his maiden Test wicket, which the on-field umpire ruled not out, but Pakistan reviewed, with ultra-edge technology confirming a spike when the ball passed the bat and into the hands of slip.
Fast bowler Naseem Shah had struck first with the wicket of Niroshan Dickwella, who fell for 15 after opening in place of Karunaratne, who did not take the field in the Pakistan innings.
Yasir Shah sent back Oshada Fernando for 19 and fellow spinner Mohammad Nawaz trapped Kusal Mendis lbw for 15.
Pakistan's innings ended after the tourists resumed the day on 191-7, in reply to Sri Lanka's first innings of 378.