Angelo Mathews led Sri Lanka's strong fightback with a career-best unbeaten 116 and put his team in a strong position to win the first Test against Pakistan on Friday.
Mathews defied Pakistan throughout the fourth day and lifted Sri Lanka to 420-5 in their second innings as bowlers toiled hard for the sole success of Dinesh Chandimal (89).
The Sri Lanka captain revived the innings by adding 138 runs with Chandimal in nearly 3½ hours after resuming at a struggling 186-4 before adding further 96 runs with Prasanna Jayawardene (48 not out).
Mathews hit 12 fours and a six in his 282-ball knock against the pace trio of Junaid Khan (3-81), Bilawal Bhatti (2-31) and wicketless Rahat Ali, and the offspin of Saeed Ajmal.
Mathews completed his second Test century off 239 balls with 11 fours and a six in the last session when he clipped
Playing in his 34th test match, Mathews surpassed his only previous test century of 105 not out against Australia in Colombo in 2011 as the Pakistan bowlers virtually had no answer to break the strong defense of the Sri
Sri Lanka 1st innings 204
Pakistan 1st innings 383
Sri Lanka 2nd innings
D Karunaratne b Junaid 24
K Silva c Akmal b Junaid 81
K Sangakkara c Younis b Bhatti 55
M Jayawardene c Shafiq b Bhatti 0
D Chandimal c Ali b Khan 89
A Mathews not out 116
H Jayawardene not out 48
Total: (5 wickets; 148 overs) 420
Fall of wickets: 1-47 2-146 3-150 4-186 5-324
Lanka skipper.Bhatti to square leg and ran for two runs.
Pakistan's lone success came before tea when Chandimal missed his century and was caught at fine leg after hitting 12 fours as Sri Lanka scored 70 runs in the second session.
Mathews and Chandimal frustrated bowlers in their century-stand after Sri Lanka resumed at a struggling 186-4, a lead of only seven runs.
Pakistan failed to cash in on its lone chance when Ahmed Shehzad could not judge a sharp edge of Chandimal in Bhatti's first over after lunch.
But the chance didn't prove that costly as Chandimal, who showed lot of patience by facing 166 balls, finally holed out to Ali to give Khan his third success of the innings.
Earlier, Chandimal resumed on 24 and moved to 67 by lunch while Mathews also completed his half century off 113 balls to revive Sri Lanka by adding 99 runs.
Pakistan had Sri Lanka in trouble on the third day when fast bowler Bhatti claimed key wickets of experienced Kumar Sangakkara (55) and Mahela Jayawardene in quick succession, and Khan had opening batsman Kaushal Silva
(81) caught behind.
But the Pakistan pacers struggled to get the much needed breakthrough as Chandimal and Mathews even played out the second new ball solidly in an extended 2½-hour first session due to Friday prayers.
Both batsmen showed a lot of grit against pacers while Ajmal looked ineffective and couldn't find much turn to bother batsmen.
Just before play started, Pakistan wicketkeeper Adnan Akmal was ruled out of the remainder of the test series after fracturing his index finger.
Akmal was hit on his left index finger when he caught Silva in the last over of the third day on Thursday.
The Pakistan Cricket Board said in a statement Friday that Sarfraz Ahmed will be flown in for the remaining two matches in the series.
Ahmed played in last year's three-test series in South Africa before Akmal regained his place in the national team.
Younis Khan replaced Akmal behind the wickets when play resumed on the fourth day.