Sri Lanka produced an outstanding batting performance on Day 4 of the first Test to give themselves a chance of defeating Pakistan in Abu Dhabi.
Having started the penultimate day on 186-4, a slender lead of seven after relinquishing a 179-run deficit on first innings, they moved to 420-5 at stumps.
Captain Angelo Mathews scored an unbeaten century while Dinesh Chandimal contributed 89.
Sri Lanka will go into the final day with a 241-run lead.
|Sri Lanka 2nd Innings: 420-5 (148 Overs)|
|Chandimal||c Rahat Ali||b Junaid Khan||89||244||166|
|P Jayawardene||not out||48||165||107|
|Extras||0nb 0w 0b 7lb||7|
Mathews and Chandimal put on a 138-run partnership for the fifth wicket before the latter departed midway through the afternoon session, just 11 runs short of a third Test century.
The 24-year-old hit 12 boundaries in his 166-ball innings before he hooked a short delivery from Rahat Ali to Junaid Khan at deep fine leg.
Mathews, who made 91 in the first innings and then bowled 13 overs, continued his Herculean effort when he brought up his second Test century with a clip to square leg off Bilawal Bhatti.
He finished 116 not out from 282 balls, and gained valuable support from wicket keeper Prasanna Jayawardene, who was 48 not out at the close.
Sri Lanka hold an invaluable 241-run lead and will look to bat Pakistan out of the contest in Saturday's morning session before attempting to bowl out the de-facto hosts at the Sheikh Zayed Stadium.
They will only need nine wickets with Adnan Akmal unable to bat. Younis Khan took over keeping duties at the start of the fourth day.