Dubai, United Arab Emirates: Younis Khan and captain Misbah-ul-Haq hit fighting half centuries to lead Pakistan to 132-3 in the second innings and narrow Sri Lanka's lead to 91 on the third day of the second test Friday.
Younis was on 62 while Misbah was on 53 as they revived their side from a perilous 19-3.
Earlier, Sri Lanka was bowled out for 388 and stretched the lead to 223 runs despite Mahela Jayawardene receiving little support from the lower order.
Jayawardene, 106 overnight, endured the pain from his stitched left hand and moved to 129 off 278 balls when his leg stump was uprooted while attempting a reverse sweep off Saeed Ajmal.
Pacemen Junaid Khan took 3-102 and Rahat Ali claimed 2-131.
Earlier Sri Lanka grabbed a wicket just before lunch after establishing a 223-run first-innings lead on the third day of the second cricket test on Friday.
Left-arm spinner Rangana Herath had Ahmed Shehzad caught behind for 9 to leave Pakistan struggling at 11-1 at the break, still trailing by 212 runs.
Resuming from 318-4 overnight, Sri Lanka lost the last six wickets for 70 runs and was all out for 388.
Mahela Jayawardene overcame pain in his stitched left hand to score 129 off 278 balls with 15 fours before being bowled by Saeed Ajmal while attempting a reverse sweep in a superb knock spanning 7 1/2 hours.
Sri Lanka's slump began in the second over of the day with captain Angelo Mathews edging seamer Rahat Ali to wicketkeeper Sarfraz Ahmed without adding to his overnight score of 42. Mathews was dropped on 6 by Sarfraz on Thursday and went on to add 93 runs with Jayawardene for the fifth wicket.
Prasanna Jayawardene was undone for 9 by Junaid Khan's sharp delivery and was clean bowled, then Herath tried to go for a quick single and was run out for 6 at 348-7.
Khan failed in an attempt to win an lbw decision through a TV referral against Jayawardene after the batsman added three to his overnight 106, and in the same over Shaminda Eranga cut the left-arm seamer to the third man boundary to extend the lead to 200. Eranga made 14.
Ajmal, who bowled 49 wicketless overs in the second innings of the drawn first test last week, had to wait a further 28 overs before he uprooted Jayawardene's leg stump.
The last-wicket pair of Suranga Lakmal and Nuwan Pradeep frustrated Pakistan for nearly half an hour before Ajmal finally folded the innings by having Pradeep leg before wicket. He took 2-56.
Khan claimed 3-102, and Ali 2-131.