Sri Lanka’s fast bowlers exploited Pakistan’s weakness against seam bowling by dismissing the home side for 165 to take control of the second test on the first day on Wednesday.
Sri Lanka was 57-1 in reply, trailing by only 108 runs.
Dimuth Karunaratne hit seven fours in a quickfire 32 before he fell to Junaid Khan but Kaushal Silva and Kumar Sangakkara guided Sri Lanka to stumps, with both on 12.
Nuwan Pradeep, with only three wickets in his last four tests, led the attack and took 3-62 with excellent backup from Shaminda Eranga, 2-25, and Suranga Lakmal, 2-45, after captain Angelo Mathews won the toss and elected to field.
Pakistan opener Khurram Manzoor stood out with a gritty 73 in 3 1/2 hours before he succumbed in a sensational collapse, as Pakistan lost eight wickets for 58 runs.
Rangana Herath polished off the tail with 3-26.