Birmingham: India captain Virat Kohli made Dawid Malan pay for dropping him twice with a maiden Test century in England as the tourists bounced back in the series opener at Edgbaston on Thursday.
India were in danger of conceding a first-innings lead of more than a hundred runs at 182 for eight.
But Kohli's superb 149 took India to 274 all out, just 13 runs adrift of England's 287.
Then with what became the last ball of the second day's play, off-spinner Ravichandran Ashwin bowled Alastair Cook for a duck with a brilliant delivery that drew the batsman forward, pitched on middle stump and turned to hit the left-hander's off pole.
It was the second time in the match that Ashwin had dismissed Cook, England's all-time leading Test run-scorer, this way.
England were nine for one at the close, a lead of 22 runs.
But it might have been a different story had not Malan dropped Kohli in the slips off James Anderson and Ben Stokes when the star batsman was on 21 and 51.
India batting coach Sanjay Bangar praised Kohli's innings by saying: "At one stage we were staring down the barrel, and the gap was huge, but because of his brilliance, and the commitment shown by the batsmen around him, it's still even stevens for both sides.
"He showed terrific discipline, I felt," added Bangar, a former India batsman. "At no instance did he reach out for the ball"
It looked as if the day might belong to Surrey left-arm swing bowler Sam Curran.
In just his second match at this level, the 20-year-old removed India's top order with a spell of three for eight in eight balls en route to Test-best figures of four for 74 in 17 overs.
"Personally, it was obviously a pretty special day for me with the ball," said Curran.
A son of the late Zimbabwe all-rounder Kevin Curran and brother of England paceman Tom, he added it had been an education to bowl to Kohli.
"Credit to a great innings there," said Curran. "I'm only in my second game, but I think it was a little eye-opener watching the way he (Kohli) bats and how precise you've got to be with your lengths (to him)."
Kohli was on 97 when No 11 Umesh Yadav came in but the tailender kept his wicket intact.
A late cut four off Stokes, his 14th boundary in 172 balls, saw Kohli to his 22nd Test hundred.
The 29-year-old then struck several stylish attacking shots, including a classic cover-drive for four off Stokes and a lofted six off leg-spinner Adil Rashid.
And when a two off Rashid toook him to 135, it meant Kohli had made more runs than he did in the whole of his maiden Test series in England in 2014, when he managed a meagre 134 runs in 10 innings.
Kohli, whose run out of opposing captain Joe Root sparked a dramatic first-innings collapse by England, playing their 1,000th Test, was eventually out when he cut Rashid to Stuart Broad at backward point.
He batted for nearly five hours and faced 225 balls, including 22 fours and a six.
Kohli also farmed the strike brilliantly during a tenth-wicket stand of 57 with Yadav, who faced 16 balls for his unbeaten one.
Earlier, Curran's wicket-taking burst began when Murali Vijay (20) was lbw on review.
Two balls later Curran dismissed KL Rahul via a flat-bat drag-on.
Left-hander Shikhar Dhawan (26) nicked a well-directed Curran outswinger to Malan at second slip.
India have long been criticised for their poor close catching but England, with the tourists still on 100 for five, dropped two slip chances of their own, with Malan reprieving Kohli off Anderson.
The next ball, the first of a new over, saw Hardik Pandya dropped on nought when Cook floored a routine first-slip chance off all-rounder Stokes.
Soon after Kohli completed his fifty he was dropped again by Malan, with Stokes once more the unlucky bowler .