Mohammad Hafeez notched his first Test half-century in 11 innings and foiled Sri Lanka's hopes for victory as Pakistan secured a draw in the first Test.
Hafeez made an unbeaten 80 and Ahmed Shehzad scored 55 as Pakistan earned the draw on Saturday by reaching 158-2 in their second-innings after Sri Lanka had set a daunting 302-run target in a possible 67 overs on the last day.
Hafeez had scored only 113 runs in his previous 11 Test innings but was recalled for the series after scoring three centuries in Pakistan's 3-2 win against Sri Lanka in the one-day series.
Hafeez hit 11 fours and faced 136 balls in his unbeaten knock while Younis Khan, who scored a century in the first innings, was not out on 13 when both captains decided to call off the match with 15 overs remaining.
Paceman Suranga Lakmal had Khurram Manzoor (eight) caught behind soon after the lunch break, but Hafeez and Shehzad were hardly fazed on a batting-friendly wicket in a 101-run stand.
Hafeez was dropped for the two-Test series against South Africa last October, but justified his recall at the No. 3 spot ahead of Test specialist Azhar Ali by continuing his ODI form in the longer format of the game.
He smashed seven boundaries in his fifty off 68 balls before tea, hitting debutant off-spinner Sachithra Senanayake for two successive fours.
Shehzad also raised a half-century with seven boundaries in his debut Test just before tea by cutting Rangana Herath to third man boundary before falling to the left-arm spinner soon after the break.
Earlier, resuming day five at 420-5, captain Angelo Mathews (157 not out) and Prasanna Jayawardene (63 not out) frustrated Pakistan's bowlers for hour and half to extend their partnership to 156 runs before the declaration came at 480-5.
Mathews, who batted the entire fourth day, faced 343 balls and hit 16 fours and a six.
The only blemish in his career-best knock came on 138 when Shehzad dropped a difficult catch off a top-edged reverse sweep.
Jayawardene, 48 overnight, completed his half-century with a pulled boundary off Bilawal Bhatti in the second over of the day, but Pakistan made sure Sri Lanka did not compile quick runs before Mathews finally declared half an hour before lunch.
The second Test begins in Dubai from January 8 while Sharjah will host the third and final Test from January 16.