Pakistan fought back after being dismissed relatively cheaply on Thursday as bowlers dominated the opening day of the second Test against Sri Lanka in Karachi.
Lahiru Kumara and Lasith Embuldeniya grabbed four wickets each to dismiss Pakistan for just 191 before the home team had the visitors at 64-3 at stumps at the National Stadium.
Pacer Kumara took 4-49 while left-arm spinner Embuldeniya finished with 4-71 after Pakistan won the toss.
But Pakistan staged a fightback with the wickets of Oshada Fernando (four), Dimuth Karunaratne (25) and Kusal Mendis (13) leaving Sri Lanka still 127 runs behind on the first innings.
Lanky pacer Shaheen Shah Afridi had Fernando caught behind before Mohammad Abbas removed Karunaratne and Mendis.
At stumps, Angelo Mathews was eight not out and night watchman Embuldeniya unbeaten on three.
Pakistan were well set at 127-3 with Babar Azam (60) and Asad Shafiq (63) involved in a 62-run stand for the fourth wicket, but once Azam fell the home side lost their last six wickets for just 24 runs.
Azam was shaping well after scoring his 13th half-century before Embuldeniya had him stumped off a well-disguised delivery.
Shafiq hooked Kumara tentatively to deep square-leg, ending Pakistan's hopes of a big total in their bid to win the series after the first Test ended in a draw due to poor weather in Rawalpindi.
Kumara dismissed Mohammad Rizwan for four and Yasir Shah (nought) off successive deliveries in the first over after tea before Embuldeniya removed the tail.
Earlier, Sri Lanka left-arm pacer Vishwa Fernando dismissed opener Shan Masood for five and skipper Azhar Ali for a duck to rattle Pakistan at 10-2 in the morning.
Fernando's new-ball partner Kumara dismissed first Test centurion Abid Ali for 38 to end a third-wicket partnership of 55, which had lifted Pakistan from a precarious 10 for two.
Fernando thought he had Azam leg-before on four, but TV referalls showed the ball hit the bat first.
Azam reached his fourth half-century in the last five innings with a crisp boundary to cover off-spinner Dilruwan Perera, but could not match his hundred in the first Test.
Azam's 96-ball knock contained eight boundaries and a six while Shafiq's 126-ball stay had six boundaries.
It was Fernando who provided Sri Lanka with early breakthroughs.
He angled one in to Masood to hit his off stump before clean bowling skipper Azhar with a full-length delivery.
That left Azhar without a fifty in 13 innings, including nine scores of under 10.
Pakistan brought in leg-spinner Yasir Shah for ailing paceman Usman Shinwari, while Embuldeniya came in for unfit Kasun Rajitha.
The two-match series is the first in Pakistan since a militant attack on the Sri Lankan team bus killed eight people in March 2009, leading to the suspension of international cricket in the country over security fears.