A brilliantly played 218 from Younis Khan and three wickets for leg spinner Yasir Shah left England reeling in the fourth Test against Pakistan at the Oval.
Younis resumed batting on day three on 101 and would add 117 runs to his overnight tally off 164 balls, putting on 97 with number 10 Mohammad Amir, whom he shielded from strike for much of the early stages of the stand.
Amir scored a career best 39 not out as Pakistan managed a mighty 542 all out.
Younis brought up his double century in consumate style, smashing Moeen Ali for six.
The veteran batsman would eventually be trapped leg before by James Anderson but by that time the damage was done.
Pakistan had built a 214 run first innings lead, and with plenty of time left England would have to play very well to get out of trouble.
When Wahab Riaz had Alastair Cook caught at slip for just seven, Pakistan had their tails up.
Shah then trapped Hales leg before with England on 49, the opener reviewed but the decision was upheld, no question about the dismissal this time.
James Vince failed again, lasting just three balls for his duck as Shah carved England open.
The spinner then got the prized wicket of Joe Root, again leg before and again England reviewed to no avail, as the number 3 was absolutely plumb.
Jonny Bairstow and Gary Ballance, guided England to 88 for 4 at the close, teetering on the brink of a defeat that will see England miss out on a number one ranking spot, and a series win that seemed almost inevitable before this Test.