COLOMBO, Sri Lanka - Mahela Jayawardene walked out for the last time to bat in a Test match to a standing ovation and a guard of honour by the Pakistani players after the visitors sent back the Sri Lankan openers before tea in the second test on Saturday.
Jayawardene joined Kumar Sangakkara (17) at the crease as Sri Lanka took their overall lead to 74 with eight second innings wickets in hand.
Left-arm spinner Abdur Rehman took two wickets to fall in the afternoon session to remove Upul Tharanga (45) and Kaushal Silva (17).
Tharanga hit four boundaries in his 63-ball innings before he dragged the ball on to his stumps while attempting a pull, ending an opening stand of 54 with Silva who fell to a catch at slip by Younus Khan.
Earlier, Sri Lankan spinner Rangana Herath returned career best figures of nine for 127 but Pakistan took a first-innings lead of 12 after wicketkeeper Sarfraz Ahmed scored his maiden test century.
Pakistan was all out for 332 at the stroke of lunch, replying to Sri Lanka's first innings total of 320.
The visitors' last four wickets added 88 runs to their overnight score of 244 for six, with Sarfraz (103) moving from 66 to his hundred with a superb pulled six off Chanaka Welegedara to become the first Pakistani wicket-keeper in five years to get to three figures.
Sarfraz held the Pakistan tail together during his 127-ball innings before Herath finally had him edging a catch to wicket-keeper Niroshan Dickwella.
Sarfraz hit one six and seven fours and added 40 runs with Abdur Rehman (16) for the seventh wicket and 28 with Wahab Riaz (17) for the eighth.
Herath continued to run through the Pakistan tail picking up the wickets of Rehman, caught by Mahela Jayawardene at slip, Riaz and Saeed Ajmal (four) while Junaid Khan remained unbeaten on 13.
Herath's morning spell on Saturday was four for 29 off 8.1 overs. He became only the second Sri Lankan bowler to take nine wickets in an innings after former off-spinner Muttiah Muralitharan.
The hosts lead the two-test series 1-0.