Yasir Shah turned in a stunning performance to leave Pakistan in a strong position at the end of day two of the first Test against England at Lord's.
After Pakistan had been bowled out for 339, England appeared set to go well past that mark at 118-1, with Alastair Cook and Joe Root looking typically assured.
But Yasir became the first leg-spinner since compatriot Mushtaq Ahmed in 1996 to take five wickets at Lord's, returning 5-64 from 25 overs as England closed 253-7, still 86 behind.
After Chris Woakes (6-70) and Stuart Broad (3-71) made short work of the long Pakistani tail, Cook survived two bad drops on 22 and 55 to make 81.
He was well supported by Root (48), but the Yorkshireman's demise saw England lose three wickets in quick succession, all to Yasir.
Mohammad Amir (1-65) then claimed Cook as his first victim upon his return to Test cricket, before Yasir secured his place on the honours board with the scalps of Jonny Bairstow and Moeen Ali to leave the tourists in control.
Visiting skipper Misbah-ul-Haq and Sarfraz Ahmed (25) made steady progress in the morning, surviving the best part of eight overs before Woakes took two wickets in three balls.
First, Sarfraz carved to backward point, before Wahab Riaz was cleaned up with a beauty.
It was left to Broad to claim the final two wickets, finally ending the resistance of Misbah (114) via an inside edge onto his stumps, before Amir - given a warm reception as he walked out to bat - was caught at slip for 12.
Alex Hales (6) edged Rahat Ali (1-68) to slip in the second over of England's reply, but Pakistan rued two poor misses from Mohammad Hafeez and Sarfraz off Cook as Amir was made to wait to celebrate.
Those escapes aside, Cook and Root sailed serenely to a century partnership before the latter skied a slog-sweep off Yasir.
The leg-spinner continued to pose problems, trapping both James Vince (16) and the returning Gary Ballance (6) to leave England 147-4.
Cook's luck ran out as Amir finally had his man, inducing a drag-on, before Yasir pushed one through an ill-judged cut from Bairstow (29) and pinned a sweeping Moeen for 23.
In fading light, Woakes and Broad saw the hosts through to stumps - Broad surviving an lbw review on umpire's call late on - with the Test intriguingly poised heading into Saturday.