Pakistan resumed the fourth day's play trailing Sri Lanka by 91 runs with seven second-innings wickets in hand but Misbah's dour 97 and wicketkeeper Sarfraz Ahmed's defiant unbeaten 70 powered them to 330 for seven when heavy drizzle forced an early close.
Ahmed and Saeed Ajmal (seven), whose bowling on the final day could prove crucial, will return on Sunday hoping to stretch the team's 107-run lead and hope for rain on a day with a cloudy forecast.
Resuming on 132 for three, the responsibility for erasing the deficit was on two of Pakistan's senior batsmen, Misbah and Younus Khan.
The duo adopted contrasting approaches with Younus's fluency complimented by Misbah's doggedness which frustrated the Sri Lankans for nearly an hour as Misbah needed 37 deliveries to score his first run of the day.
Younus, who stood well outside the crease to negate any swing, hit Suranga Lakmal through extra cover for the
Pakistan first innings 165
Sri Lanka first innings 388
Pakistan second innings
K Manzoor c H Jayawardene b Pradeep 6
A Shehzad c H Jayawardene b Herath 9
M Hafeez c H Jayawardene b Pradeep 1
Y Khan c H Jayawardene b Lakmal 77
M-ul-Haq b Herath 97
A Shafiq c Karunaratne b Eranga 23
S Ahmed not out 70
B Bhatti b Eranga 32
S Ajmal not out 7
Total: (7 wickets; 123.3 overs) 330
Fall of wickets: 1-11 2-12 3-19 4-148 5-200 6-245 7-312
first boundary of the day but runs were not easy to come by.
The former Pakistan captain was lured in by the width of a Lakmal delivery and miscued a cut shot to give Prasanna Jayawardene his fourth catch of the innings.
Younus, who made a fluent 77 off 173 balls with five boundaries, added 129 for the fourth wicket with Misbah who looked unperturbed by the slow run rate.
Misbah added 52 more runs with Asad Shafiq (23) who fell to Shaminda Eranga with the new ball.
The 39-year-old right-hander occasionally broke the shackles, hitting Rangana Herath's first ball of the day to the midwicket boundary but the stocky left-arm spinner had the last laugh.
Swept for a four in the first delivery of another over, Herath sent down the third from round the wicket and spun it past Misbah's tentative blade and on to off-stump.
It took a nearly unplayable delivery to end Misbah's painstaking 248-ball vigil, which included eight fours and a six, before the tea break.
Bilawal Bhatti braved an injured hamstring to score 32 runs but could not lock an Eranga yorker which knocked off the bails.
Sarfraz reached his maiden fifty, however, the rookie stumper hitting seven boundaries in his unbeaten 123-ball knock.