A fantastic spell of bowling from leg-spinner Yasir shah put Pakistan in a commanding position to win the first match of their two-Test series against Sri Lanka on Monday in Abu Dhabi.
The leggie claimed five wickets as the Islanders were bowled out for 138, which left Pakistan needing just 136 to claim the Test.
Earlier, the visitors had resumed their second innings at 69-4, leading Pakistan by 66 runs with six wickets in hand.
Shah grabbed the key wicket of Dinesh Chandimal to leave visitors fighting to avoid defeat on Sunday.
The prolific wicket-taker took 2-25 as Sri Lanka, who dominated this game for a long period of time, now needing a rearguard action to save the Test.
It was tough to negotiate spin on a fourth-day Sheikh Zayed Stadium pitch, but despite a 32nd Test five-wicket haul for veteran Sri Lankan spinner Rangana Herath, Pakistan posted 422 to take a slender three-run lead after Sri Lanka had made 419 in their first innings.
At the close, Kusal Mendis was batting on 16, with nightwatchman Suranga Lakmal on two, after a day of fluctuating fortunes.
Herath’s 5-93 in 40 overs were well foiled by a brilliant 76 by Test debutant Haris Sohail, as initially it looked as though Sri Lanka would take a first-innings lead.