Yasir took his match haul to a Pakistan ground-record 10-141 to help bowl England out for 207 late on the fourth evening, in pursuit of 283 – their highest chase at this venue.
Misbah-ul-Haq’s tourists are therefore 1-0 up, with three to play, having profited most from their captain’s first-innings century and then Yasir’s expertise – defying unfamiliar climes, in his first Test outside Asia.
Three 40s in England’s middle order were not enough, after they had bowled Pakistan out for 215 and set off to make some history of their own – with almost two full days at their disposal.
Rahat Ali took three top-order wickets; then Yasir (4-69) had his predictable say too, and Mohammad Amir appropriately helped finish the job as a succession of batsmen failed to decide between attack and defence and struggled for a winning tempo.
In a match billed for months as the Test return of Amir after his five-year ban for spot-fixing here, and all that might entail in terms of crowd and opposition reaction, it has been intrigue of the right kind which has taken over from the outset.
Wise heads had predicted England’s best chance of success lay with a substantial score from either Alastair Cook or Yorkshire’s Joe Root.
There was none forthcoming, though, as Rahat did the early damage.
Cook got a thin edge behind, and Root (nine) mistimed a pull straight to one of the two men positioned in the leg-side deep for just that errant possibility.
Not for the first time this summer, he departed full of self-reproach – third out, after Alex Hales had thrown the bat at a little width only to edge high and fast to slip, where Mohammad Hafeez took a very good catch.
Rahat (3-47) very nearly had four before lunch, James Vince surviving on nine when he squeezed an edged drive low to Younus Khan’s right at second slip.
It would have been a breath-taking catch had the veteran collected either with his initial dive or the parry he flicked up to have a second chance.
He did not quite manage either, and Vince greeted Wahab Riaz’s first over with a rush of boundaries – three, including two fine pulls, off the left-armer and then two at the other end off Yasir, all in the space of six balls.
Yorkshire’s Gary Ballance was less adventurous, and it was an optimistic drive to only his third ball after lunch that did for Vince (42) when he edged Wahab to second slip where Younus held on this time.
The Ballance method did not quite cut it either as he, like Vince, fell short of 50 just when it seemed he might haul England within sight of victory.
His mistake was unexpected, getting much too far across his stumps to a Yasir leg-break as he was bowled round his legs from round the wicket.
Moeen Ali then gave himself only three sighters before he went on the charge at Yasir, missed and was bowled by another leg-break.
It was therefore over to antoerh Yorkshire player in Jonny Bairstow, batting stoically against type, and Chris Woakes – England’s hero with the ball in this match – to try to keep hope alive.
They had fortune on their side, and Wahab decidedly did not in a brilliant five-over spell in which both batsmen played, missed and edged yet somehow stayed put in a laborious 50 stand containing just three fours in more than 28 overs.
Bairstow became the third England batsman to fall in the 40s, when he tried to whip a leg-break past mid-on off the back foot and was instead the third to be bowled by a Yasir leg-break for 48.
Amir then returned to bowl Stuart Broad with full-length swing and even Woakes, in a match he will nonetheless remember fondly for his brilliant individual performance, could not prevent the inevitable as the last four wickets fell for 12 runs.
He was ninth out, edging to slip as Yasir completed his 10-wicket match haul, and Amir then clean-bowled No 11 debutant Jake Ball.
Broad (3-38) had earlier taken two wickets in two balls to finish with six in the match, to Woakes’s 11, as Pakistan added only a single to their overnight total. Yasir gloved behind trying to pull, and was well-caught high above his head by Bairstow. It was Broad’s 350th Test wicket, with only James Anderson and Sir Ian Botham above him in England’s all-time list, and he wasted no time over No 351, Amir also edging behind on the back foot.
In the end, though, England had still left themselves with too much to do.