Alastair Cook marked his final Test innings with a storybook hundred and England captain Joe Root also made a century as India crumbled at the Oval on Monday.
India were 58 for three in their second innings, needing a further 406 runs to reach their victory target of 464, at stumps on the fourth day of the fifth Test against England.
KL Rahul was 46 not out and Ajinkya Rahane 10 not out.
England, already 3-1 up in this five-match series, scored 423 for eight in their second innings.
Cook made 147 and Root, his successor as England captain, 125, with the pair putting on 259 for the third wicket.
The 33-year-old Cook is retiring from international cricket after this match and Monday's innings meant the Essex left-handed opener became just the fifth player and first Englishman to score a hundred in both their first and last Tests after Australia's Reggie Duff, Bill Ponsford and Greg Chappell and India's Mohammad Azharuddin.
England resumed on 114 for two, already 154 runs ahead, with Cook 43 not out and Root unbeaten on 29.
A capacity crowd, willing Cook to score a hundred, gave him the first of seven standing ovations on the day as he walked out to bat.
And they were soon giving him another when Cook, from his second ball of the day, turned fast bowler Jasprit Bumrah off his pads to complete a 127-ball fifty with his fourth four.
Cook in fine touch, late cut left-arm spinner Ravindra Jadeja for another well-struck boundary.
When the left-hander squirted a single off Shami and moved past Sri Lanka great Kumar Sangakkara's tally of 12,400 runs and into fifth place in the list of all-time leading Test run-scorers, the crowd rose again.
Cook was already England's leading Test run scorer and century maker, with this match seeing him extend his national appearance record to 161 Tests.
And he completed his 33rd Test century in unusual fashion when, having run a single to go to 97, a wild overthrow from Bumrah gave him four bonus runs.
The crowd rose to give Cook yet another ovation as he celebrated a 210-ball century featuring eight fours and that five which took him to three figures.
It was his first Test hundred since he made a marathon 244 against Australia in December.
Root also completed his century after lunch and was far more animated than Cook's had been after scoring his first ton in over a year. After the massive stand both departed in one over. Cook's edged cut was held by Pandya to an innings of 286 balls including 14 fours. Again spectators were on their feet, Cook bowing out with a record of 12,472 Test runs, including 33 hundreds, at an average of 45.35.
SCORES IN BRIEF
ENGLAND: First innings 332 and second innings 423 (Cook 147, Root 125; Vihari 3-37, Jadeja 3-179)
INDIA: First innings 292 and second innings 58 (Rahul 46 not out, Rahane 10 not out; Anderson 2-23, Broad 1-17)