(Reuters) - Pakistan's Shan Masood struck his maiden test century and Younus Khan his 30th to fuel their spirited chase for a daunting 377-run victory target in the series-deciding third and final test against Sri Lanka at Pallekele on Monday.
The unbeaten duo added 217 runs to help the visitors overcome a wobbly start and reach 230 for two at stumps on the penultimate day of the contest.
Playing only his fifth test, left-handed Masood brought up his maiden century by hitting off-spinner Tharindu Kaushal for a six and remained not out on 114, which included 11 boundaries.
Veteran Younus again underlined his importance to the team, hitting nine boundaries in his unbeaten 101 and becoming the first test batsman to score five fourth innings centuries.
Pakistan's highest fourth-innings partnership ever leaves them needing 147 runs on Tuesday to clinch the match and the series, a remarkable comeback after being reduced to 13-2.
Sri Lanka's Angelo Mathews (122) had earlier notched up his fifth test century and was the last of their batsmen to fall at the stroke of lunch as the hosts were all out for 313 in their second innings.
Pakistan wobbled early in their chase when Ahmed Shehzad was clean bowled by Suranga Lakmal in the second over of the innings with the visitors yet to open their account.
Azhar Ali, Pakistan's most prolific batsman in the series, did not last long either, edging Dhammika Prasad behind as the visitors slumped to 13-2.
Masood and Younus then took over, frustrating the hosts with resolute batting.
The pitch offered ample turn but Sri Lanka's lone specialist spinner Kaushal could not make the most of it and never really troubled the batsmen.
Masood was lucky to survive a close leg before appeal on 79 and bowler Mathews reviewed the original not out decision but could not get it overturned.
It was a memorable day for Imran Khan too as the Pakistan paceman mowed down the bottom half of the Sri Lanka innings with the second new ball for his maiden five-wicket haul.
Armed with the new ball, he dismissed Dinesh Chandimal (67) and Prasad off successive deliveries but was denied a hat-trick by Kaushal who eventually fell to him when on eight runs.
The 27-year-old completed his five-wicket collection when Mathews fell caught behind after a 252-ball knock that included 12 boundaries and a six.