ABU DHABI: Pakistan, chasing a tricky 138 to win, failed to survive the quality Sri Lankan bowling and eventually ended up being dismissed for 114.
Skipper Sarfraz Ahmed was 13 not out and Haris Sohail 19 as Pakistan need another 69 runs to take a 1-0 lead in the two-match series at lunch.
After the lunch break, Pakistan team began to crumble with Sarfraz becoming first victim of the SL bowling.
Earlier, Yasir Shah took 5-51 to help Pakistan dismiss Sri Lanka for 138 in their second innings.
Taking a five-wicket haul, leg-spinner Yasir Shah cleaned up Sri Lanka for 138, leaving Pakistan with just 136 to chase for victory in the first Test.
The visitors lose the wickets of Kusal Mendis and Suranga Lakmal to fast bowler Mohammad Abbas, while Herath and Dilruwan Perera lost their wickets to rampaging spinner Yasir Shah.
Pakistani pacer Mohammad Abbas struck early on final day of the first Test, sending Mendis and Lakmal back to the pavilion after the visiting team resumed their second innings at 69/4, leading Pakistan by 66 runs with six wickets intact.
Leg-spinner Yasir 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.
— PCB Official (@TheRealPCB) October 2, 2017
It was tough to negotiate spin on a fourth-day at 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.