DUBAI - Paceman Wahab Riaz grabbed four wickets and left-arm spinner Haris Sohail took three to dismiss Sri Lanka for 96 in their second innings on the fourth day in the day-night Test in Dubai on Monday.
Riaz, who had taken three wickets on Sunday, finished with 4-41 while Sohail grabbed his three in one over to give Pakistan a target of 317 to win the Test and level the series.
Sri Lanka had won the first Test by 21 runs in Abu Dhabi.
Pakistan needed early gains and Riaz provided them with the important wicket of Niroshan Dickwella in the fifth over of the day for 21.
Leg-spinner Yasir Shah dismissed Dilruwan Perera for nought to leave Sri Lanka in danger of being dismissed for their lowest ever total of 71 against Pakistan.
But Kusal Mendis (29) and Rangana Herath (17) added 35 for the eighth wicket to frustrate Pakistan but Sohail struck thrice in his only over to give his team hope of an upset win.
Shah finished with 2-47.