Ramesh Mendis completed a five-wicket haul as Sri Lanka bowled Pakistan out for 231 to take a 147-run first-innings advantage in the second cricket Test.
Niroshan Dickwella and Oshanda Fernando then combined to increase the lead to 169 at lunch on day three on Tuesday.
Fernando was eight not out and Niroshan Dickwella, who had to open the innings in the absence of skipper Dimuth Karunaratne, was unbeaten on 11 as Sri Lanka reached 22 without loss.
Karunaratne was sidelined with a sore back and didn’t field, meaning he cannot bat early in Sri Lanka’s second innings. Dhananjaya de Silva is deputising as captain.
Pakistan resumed Tuesday at 7-191 and added only 40 runs. Yasir Shah (26) and Hasan Ali (21) combined for a 32-run eighth-wicket stand and batted through the first hour before Prabath Jayasuriya (3-80) broke through for Sri Lanka.
Off-spinner Mendis snared the last two wickets to return 5-47 from 21.1 overs, his third five-wicket haul in a Test innings.
Pakistan won the first Test last week after chasing down a target of 342 runs, a record at Galle.
The series is continuing despite economic and political turmoil in the island nation, which has led to severe shortages of essential items such as fuel, cooking gas and medicine.