Pakistan gained the upper hand on the first day of the second Test against Sri Lanka in Colombo.
The hosts, who won the toss and elected to bat, were reduced to 261-8 at stumps at the Sinhalese Sports Club Ground.
There was disappointment for the home fans as Mahela Jayawardene, in his 149th and final Test, was dismissed for only four.
Sri Lanka were 69 without loss at lunch and 162-2 at the tea interval but lost a flurry of wickets in the final session with seamer Junaid Khan picking up four wickets.
He ended a 79-run opening partnership by having Kaushal Silva caught behind for 41 before key man Kumar Sangakkara was bowled off an inside edge by Wahab Riaz for 22.
The home fans were left silent as 37-year-old Jayawardene, who was given a guard of honour on his way to the crease, was trapped LBW by Saeed Ajmal.
Opener Upul Tharanga fell eight runs short of his century when he flicked Riaz to Azhar Ali, who made a sharp catch away to his right.
Junaid then ripped apart the lower middle order by removing Lahiru Thirimanne (20), Niroshan Dickwella (20) and Dilruwan Perera (zero).
A great final session for the tourists was capped when home skipper Angelo Mathews gloved Wahab behind after making 39 in the final over of the day.
|Sri Lanka 1st Innings: 261 for 8 (85.1 overs)|
|Tharanga||c Azhar Ali||b Riaz||92||266||179|
|K Silva||c Sarfraz Ahmed||b Junaid Khan||41||189||106|
|M Jayawardene||lbw||b Ajmal||4||29||16|
|Mathews||c Sarfraz Ahmed||b Riaz||39||142||86|
|Thirimanne||c Sarfraz Ahmed||b Junaid Khan||20||61||50|
|Dickwella||lbw||b Junaid Khan||24||37||27|
|D Perera||lbw||b Junaid Khan||0||2||3|
|Extras||5nb 0w 4b 6lb||15|
Sri Lanka won the opening match of the two-game series by seven wickets.