India has taken the last four wickets in under an hour to bowl England out for 367 and win an astonishing final Test by six runs to draw the series at the Oval.
England began a drizzly morning needing 35 runs to win to reach the target of 374.
Fast bowler Mohammed Siraj was India's hero, dismissing Jamie Smith and Jamie Overton before bowling Gus Atkinson to complete a five-wicket haul.
After Prasidh Krishna bowled Josh Tongue for a duck, Chris Woakes emerged from the locker room with 17 runs still needed, walking out to bat with his dislocated shoulder under his sweater and in a sling.
Former England fast bowler Steve Harmison said Woakes "put his whole career on the line" to try to get his team home.
"He's 37. One big knock on that and that is him possibly done anyway," he told ESPN.
"But to put his career on the line to fight every tooth and nail … that took some courage and bravery. Fair play to Chris to come out an fight for England all the way to the bitter end."
Atkinson hit Siraj for six to give England brief hope and cleverly protected Woakes from the strike, but Siraj produced another brilliant yorker to earn India their narrowest Test win by runs.
[scorecard]"With 60, 70-odd runs to win with seven wickets in hand you don't get to see many games like this," India captain Shubman Gill said.
"Very happy to get this over the line, a little bit of luck for us."
It was a fitting finale to a series that has featured enthralling contests, bitter clashes and some truly exceptional cricket across the five Tests.
"It's been a pretty special one to be a part of. It's been full of ups and downs, ebbs and flows throughout every game. India have been in control then we've been in control then it's gone back to them then it's come back to us," injured England captain Ben Stokes said.
"So to be able to experience five games like this has been pretty special — we had a similar situation in '23 with the Ashes where we had to come here and win the game, and that was another special series to be a part of. That was 2-2, this was 2-2.
"It's just been awesome to be a part of. Obviously there is still that disappointment, but for the wider game we want to constantly be promoting the game and this series has been great for that."
England, 3-301 at one stage, lost their last seven wickets for 66 runs, a collapse prompted by Harry Brook's reckless dismissal after he had made a superb century, throwing his bat away as he tried to slog Akash Deep down the ground.
India suddenly had a glimmer of hope and took full advantage, removing Jacob Bethell (5) and Joe Root (105) before bad light and rain ended the fourth day early.
England still needed 35 runs to complete their second-highest Test run chase and by far the largest for any team on this ground.
The Oval was full for the final act of a series that fluctuated wildly over seven weeks and under grey skies in an atmosphere of unremitting tension as one of the most dramatic endings to a Test match duly played out.
It was fitting that Siraj was the main man for India because he had stepped over the boundary cushion after dropping Brook on 19 on Sunday, an error that looked likely to cost his team the game.
Woakes was the not out batter having not faced a ball but running bravely in obvious pain.
"I didn't expect him to come out like that, batting with one hand. Kudos to him," Gill said after his team did a lap of honour.
ABC with wires