Colombo: Opener Upul Tharanga scored 45 as Sri Lanka went ahead by 74 runs with eight wickets in hand in the second and final Test against Pakistan in Colombo on Saturday.
The hosts, trailing by 12 runs on the first innings, were 86-2 in their second knock at tea on the third day at the Sinhalese Sports Club.
Kumar Sangakkara was unbeaten on 17 and the retiring Mahela Jayawardene, who was warmly applauded to the crease by Pakistani fielders and some 4,000 home fans, was on one in his last Test innings.
Tharanga made 45 in an opening stand of 54 with Kaushal Silva before both batsmen were dismissed by left-arm spinner Abdur Rehman in the post-lunch session.
Pakistan seamer Junaid Khan did not take the field in the second innings as he was taken to hospital for a precautionary check-up after complaining of giddiness.
Junaid, who took five wickets in the first innings, had been hit on the helmet by a rising ball from Dhammika Prasad in the morning session.
Earlier, Pakistan`s wicket-keeper Sarfraz Ahmed smashed a maiden Test century and Sri Lanka`s spinner Rangana Herath became the first left-arm bowler in history to take nine wickets in an innings.
Sarfraz hit a gutsy 103 as Pakistan carried their overnight score of 244-6 to 332 before they were all out at the stroke of lunch in reply to Sri Lanka`s 320.
Sarfraz, who came to bat after tea on Friday with Pakistan struggling at 140-5, led a remarkable fightback by the lower order that enabled the tourists gain the slender lead.
But Herath grabbed attention in the eventful morning session by claiming the four remaining wickets to finish with 9-127, only the second Sri Lankan after Muttiah Muralitharan to take nine wickets in an innings.
The 36-year-old Herath, who surpassed his previous best of seven for 89 against Bangladesh in Colombo last year, is the number one Test spinner in the official rankings.
He has claimed 255 wickets so far in 57 Tests.
The tourists are seeking a series-levelling win after losing the first Test in Galle by seven wickets.
Starting the day on 66, Sarfraz reached his hundred by hooking left-arm seamer Chanaka Welegedara for a six after pulling the previous delivery for a boundary.
He was ninth out with Pakistan just six runs away from taking the lead when he edged Herath to give wicket-keeper Niroshan Dickwella his fifth catch in the innings.
Last man Junaid hit an unbeaten 13 to help Pakistan go past Sri Lanka`s total.
Herath, who earlier in the morning had dismissed Rehman (16) and Wahab Riaz (17), ended the innings by bowling Saeed Ajmal for four.