Sri Lanka grabbed the vital wicket of Younis Khan as they pushed for victory in the second Test against Pakistan in Dubai on Saturday.
Paceman Suranga Lakmal had Younis caught behind for 77 in the 11th over of the day but Pakistan reached 4-189 at lunch on the fourth day at Dubai stadium as they inched towards making their opponents bat again.
With his side needing a further 34 runs to avoid an innings defeat, skipper Misbah-ul Haq was unbeaten at the break after a gritty 74, with Asad Shafiq not out 18.
Sri Lanka have never defeated Pakistan by an innings in the 44 previous Tests between the two nations.
The first Test in the three-match series ended in a draw in Abu Dhabi last week.
Pakistan resumed on 3-132 and needed Younis and Misbah to dig deep but Younis tried to drive a slightly wide delivery from Lakmal, managing only to edge it to wicketkeeper Prasanna Jayawardene, who held his eighth catch of the match.
Younis batted for 235 minutes and hit five boundaries, adding 129 runs for the third wicket with his skipper.
Misbah, who took 38 balls to add to his overnight score of 53, has so far hit seven boundaries and a six during his resolute knock.
Shafiq, who hit a hundred in Dubai against South Africa in October last year, had some anxious moments but survived to reach lunch.
Paceman Nuwan Pradeep has figures of 2-41.