Dilruwan Perera missed a century on his debut while skipper Angelo Mathews fell for 91 as Sri Lanka frustrated Pakistan in the third and final Test in Sharjah on Friday.
Perera (95) and Mathews made life difficult for Pakistan through their 112-run seventh wicket stand before Sri Lanka declared their first innings at 428-9, leaving Pakistan to score 19-0 in a tricky six overs before the close of the second day's play.
Openers Ahmed Shehzad (five) and Khurram Manzoor (14) survived an anxious time as Pakistan go in search of a big lead to square the series after losing the second Test by nine wickets in Dubai.
Sri Lanka, leading the series 1-0 after the first Test ended in a draw in Abu Dhabi, are aiming to seal the series.
The day once again exposed the flat Sharjah stadium pitch as Mathews put on 73 for the sixth wicket with Prasanna Jayawardene (35) and then batted solidly with Perera, leaving Pakistani bowlers frustrated and failing in their search for quick wickets.
The 31-year-old Perera, who made his one-day debut in 2007 but had never played a Test before, looked more solid during his 305-minute innings as he drove and pulled with perfection before hooking paceman Mohammad Talha into the hands of deep fine-leg.
He hit 12 boundaries and two sixes and added an invaluable 72 for the ninth wicket with Shaminda Eranga (25 not out).
Mathews once again anchored the Sri Lankan batting, defying Pakistan's bowling for six hours before he fell to a miscued drive off paceman Junaid Khan who finished with figures of 3-81. Talha finished with 3-99 while spinner Saeed Ajmal had 2-120.
Mathews, who hit 91 and a career best 157 not out in the drawn first Test in Abu Dhabi, took full advantage of the dropped caught and bowled chance by Talha on Thursday when on nought, by hitting five boundaries and a six off 256-balls.