Sri Lanka lost their top order batsmen early on in their second innings but extended their lead to 220 runs over Pakistan in the third and final Test in Sharjah to boost their chances of a series victory.
Spinner Abdur Rehman and paceman Mohammad Talha picked up two wickets apiece to reduce Sri Lanka to 89 for four but experienced Mahela Jayawardene (46) and captain Angelo Mathews (14 not out) thwarted Pakistan with a stand of 38 runs.
At stumps on the penultimate day of the series, Sri Lanka reached 133 runs for five wickets to add to their first-
Sri Lanka first innings 428
Pakistan first innings 341
Sri Lanka second innings
F Karunaratne b Talha 8
J Silva b Rehman 36
K Sangakkara c Manzoor b Rehman 8
D Jayawardene c Ali b Ajmal 46
L Chandimal b Talha 13
A Mathews not out 14
H Jayawardene not out 6
Total: (5 wickets; 71 overs) 133
Fall of wickets: 1-13 2-37 3-66 4-89 5-127
innings lead of 87.
Jayawardene, who made 129 in his team's nine-wicket win in Dubai in the second Test, became the first Sri Lankan to cross 11,000 test runs and eighth batsman overall during his innings.
His careful knock came to an end when his bat-pad catch off Saeed Ajmal was smartly taken by Azhar Ali at short leg.
Left-arm spinner Rehman extracted good turn from the pitch and picked up the wickets of opener Kaushal Silva (36) and Kumar Sangakkara (eight) while Talha dismissed Dimuth Karunaratne (eight) and Dinesh Chandimal (13).
Khurram Manzoor did not help Pakistan's cause by dropping an easy chance from Mathews at cover off fast bowler Junaid Khan with the batsman on nine.
Wicketkeeper Sarfraz Ahmed also dropped a sharp chance from Prasanna Jayawardene (six not out) off Ajmal before the batsman had opened his account.
Earlier in the morning, Rangana Herath picked up his 17th five-wicket haul in Tests for Sri Lanka as Pakistan were bowled out for 341.
Fast bowler Shaminda Eranga picked up the first two wickets to fall to take his innings tally to four as Pakistan went for quick runs to wipe off the deficit.
Pakistan captain Misbah-ul-Haq hit three sixes and a four in his knock of 63 before being caught at long-on trying to clear Herath over the ropes.
Junaid also struck two sixes to reduce the fist-innings deficit before he too was caught in the deep off Herath.