Leeds: Moeen Ali's rapid 84 helped England turn the tide on the fourth day of the second Test against the West Indies at Headingley on Monday.
At stumps, the West Indies were five without loss in their second innings, needing a further 317 runs to reach a challenging victory total of 322.
Only one side have made more in the fourth innings to win a Test at Headingley, with Australia's celebrated 'Invincibles' scoring 404 for three in 1948 thanks to opener Arthur Morris's 182 and an unbeaten 173 from the great Donald Bradman.
West Indies did make 344 for one to beat England in a Test at Lord's in 1984, with opener Gordon Greenidge scoring 214 not out, but they will likely need a similarly brilliant innings from one of their current top order if they are to level this three-match series at 1-1.
It was fresh evidence of England's batting strength in depth that No 8 Ali top-scored and put on 117 for the eighth wicket with No 9 Chris Woakes, the recalled all-rounder himself making 61 not out before captain Joe Root declared his side's second innings on 490 for eight.
West Indies had a tricky six overs to bat until the close but Kraigg Brathwaite and Kieran Powell survived.
The whole day represented a remarkable turnaround in the match given the West Indies had a first-innings lead of 169 runs, a testament to a vastly improved batting and bowling, if not fielding, display after their embarrassing innings and 209-run defeat in the first Test at Edgbaston.
"To have a lead is absolutely gold at the minute," left-handed batsman Ali, who faced just 93 balls with 14 fours, told Sky Sports.
"Realistically we were thinking we could get a lead of 180 but to have this lead is fantastic."
England had started Monday's play just two runs ahead and already three wickets down.
But brisk fifties from Root (72), his second of the match on his Yorkshire home ground and Ben Stokes (58), following up his first-innings score of 100, plus a painstaking 61 from Dawid Malan, laid the platform for Ali's late-order assault.
A dispiriting day for the West Indies was summed up when Ali was reprieved on 32.
He bottom-edged a cut off leg-spinner Devendra Bishoo and was superbly caught by wicket-keeper Shane Dowrich only for Indian umpire S Ravi to make a desperately tight no-ball call.
It seemed almost cruel that the West Indies, who had dropped several catches this Test at a potentially match-losing cost of 238 runs, should have their best effort of the game chalked off this way.
But Shannon Gabriel did not help their cause with nine wides and 10 no-balls in an innings total of 39 extras.
Ali, whose languid cover-driven four off fast bowler Gabriel saw him to fifty, holed out off Bishoo in sight of his sixth Test hundred.
Off-spinner Roston Chase (three for 86) removed Stokes, Malan and Jonny Bairstow in quick succession before tea but that simply paved the way for Ali and Woakes's run-spree.
England resumed on 171 for three after the West Indies had made 427 in their first innings following hundreds from Shai Hope (147) and Brathwaite (134).
Root, dropped in the gully on 10, was 45 not out and Malan, who had a lucky break on four when the West Indies opted against reviewing a potential catch, was unbeaten on 21.
Root completed his second fifty this Test in 87 balls after he edged two fours off Kemar Roach.
But the breakthrough the West Indies needed came when Root, cramped for room trying to cut Gabriel, steered the ball to gully where Shai Hope clung on to a juggled catch.
England were then 212 for four, but they did not lose another wicket until their score had moved on to 303.
First-slip Powell dropped Malan on 32, although the blame lay mainly with Dowrich for moving across only to bail out of the catch.
Find latest and upcoming tech gadgets online on Tech2 Gadgets. Get technology news, gadgets reviews & ratings. Popular gadgets including laptop, tablet and mobile specifications, features, prices, comparison.
A target of 130 proved well within the range of England, the world's top-ranked T20 side, as they won with 17 balls to spare.
South Africa will start the third day of the second Test with a healthy advantage of 149 runs.
Follow live score and updates from the 1st T20I between England and Sri Lanka on our blog.