Mahela Jayawardene scored four streaky runs in his last Test, as Pakistan's bowlers dismantled Sri Lanka's first innings on the opening day of the second and final match, in Colombo, on Thursday.
The hosts, who won the toss and elected to bat on an easy-paced wicket, found runs hard to come by against the steady attack and plodded to 261-8 by stumps, at the Sinhalese Sports Club.
Upul Tharanga hit 92 and fellow-opener Kaushal Silva 41, but Sri Lanka lost seven wickets on either side of the tea interval after coasting at 144-1.
Pakistan's two left-arm seamers Junaid Khan and Wahab Riaz toiled manfully under the hot sun to share seven wickets and lead a spirited display by the tourists seeking a series-levelling win.
Junaid ended the day with four for 69, including two wickets in the first over with the second new ball, taken towards the end of the day's play. Riaz had three for 66.
Sri Lanka's skipper Angelo Mathews made 39 before he was caught behind off Riaz for what became the last delivery of the day.
Tharanga put on 79 for the first wicket with Silva and 65 for the second with Kumar Sangakkara, but missed his century when he fell to a sharp catch by Azhar Ali at short-leg off Riaz.
Sangakkara, who hit 221 in the first Test in Galle which Sri Lanka won by seven wickets, managed just 22 before being bowled by a superb in-cutter from Riaz.
Pakistan's fielders lined up to greet Jayawardene, a 37-year-old veteran of 149 Tests, to the crease as firecrackers went off in the stands and some 3,000 home fans gave him a standing ovation.
But the star batsman, who was dropped by wicket-keeper Sarfraz Ahmed off Junaid just before tea, fell in the first over after resumption when he was trapped leg-before by Saeed Ajmal.
Ajmal, who will have his bowling action tested at the end of the month after being reported by the umpires in Galle, bowled 29 overs to take one for 67.
Left-handed Tharanga survived a difficult stumping chance when he was on 24 as a ball from Ajmal rose alarmingly and struck the wicket-keeper on the left ear.
Lahiru Thirimanne (20) was caught behind off Junaid, an over after being dropped in the slips off the same bowler.
Sri Lanka made two changes from the side that won the first Test to take the lead in the two-match series.
Left-arm seamer Chanaka Welegedara and batsman Thirimanne replaced the injured duo of Shaminda Eranga and Kithuruwan Vithanage.
Pakistan left out lanky fast bowler Mohammad Talha to play Riaz.
Image: Sri Lanka's Upul Tharanga reacts as he walks off the field after being dismissed by Pakistan's Wahab Riaz (not pictured) during the first day of the second and final Test in Colombo.
Photograph: Dinuka Liyanawatte/Reuters