Mahela Jayawardene fell cheaply in his final Test as Pakistan came back strongly in the last session to grab five wickets and reduce Sri Lanka to 261 for eight on the first day of the second Test in Colombo on Thursday.
Dhammika Prasad was unbeaten on four at the close after captain Angelo Mathews was dismissed for 39 in the final over of the day when he was caught down the leg side off Wahab Riaz.
Left-arm fast bowler Junaid Khan took three of the four wickets to fall in the session and ended the day with figures of four for 69.
There was great expectation from the spectators who had turned up to see former captain Jayawardene play in his 149th Test, but the elegant 37-year-old lasted just 16 balls and made four runs before he was trapped lbw by Saeed Ajmal in the first over after tea.
Pakistan also grabbed the wicket of opener Upul Tharanga when he flicked a ball from Riaz and the inside edge that came off his pad was held smartly by Azhar Ali at short leg after a fumble.
Tharanga scored 92 off 179 balls including 12 fours.
The final session was Pakistan's most fruitful for they took four wickets including that of Lahiru Thirimanne for 20, Niroshan Dickwella for 24 and Dilruwan Perera for a duck.
Thirimanne edged Junaid to Sarfraz after being missed on 14 by Khurram Manzoor at first slip.
Dickwella and Perera were lbw victims to the second new ball.
Dickwella unsuccessfully challenged the umpire's decision and lost a review for his team but Pakistan were successful with Perera's dismissal which the umpire had initially ruled not out.
Kumar Sangakkara, the most prolific scorer in the series so far, had a testing time against Wahab Riaz before he was bowled off an inside edge for just 22.
Riaz peppered Sangakkara, who scored a double century in the first Test, with short-pitched balls which momentarily shook his confidence and eventually led to his downfall.
As Sangakkara departed, Jayawardene walked out to a standing ovation and the Pakistan players formed a guard of honour as fire-crackers exploded around the packed Sinhalese Sports Club ground.
Sri Lanka, who won the first Test by seven wickets, had batted cautiously to reach 69 without loss at lunch after winning the toss.