South Africa put themselves within striking distance of a Test series victory over India despite Rishabh Pant producing a terrific century on day three at Newlands.
Proteas captain Dean Elgar and Keegan Petersen combined for a 78-run partnership after tea as South Africa chased 212 to win the Cape Town tussle and take a 2-1 series victory.
India took what may yet be a priceless wicket with what proved to be the final delivery of the day, with Elgar caught down the leg side by Pant off Jasprit Bumrah, a review showing a clear nick.
He fell for 30, with Petersen unbeaten on 48 and South Africa 101-2, needing 111 more runs to get over the line.
There was Test history made earlier in the day as India were bowled out for 198 in their second innings, with Pant making 100 not out – described by India great Sachin Tendulkar on Twitter as "a simply outstanding knock".
All 10 India wickets fell to catches, just as they had in the first innings. That meant for the first time in Tests, a team lost all of their 20 wickets to catches.
India slumped from 152-4 to fall short of 200, but it was not for the lack of trying from Pant, who scored his runs from just 139 balls, with six fours and four sixes.
Temba Bavuma almost caught the wicketkeeper-batsman on 94 when the left-hander struck powerfully down the ground, but the ball squirted through the fielder's grasp and ran to the boundary.
He reached the fourth century of his Test career by tucking away a single to long leg before raising his bat in delight, but India, who began the day at 57-2, failed to back up his efforts. Collectively, Pant's team-mates contributed just 70, with 28 coming from extras.
Skipper Virat Kohli dug in before falling to Lungi Ngidi (3-21) for 29, having faced as many as 143 balls. Kagiso Rabada took 3-53 in another impressive effort from the Proteas in the field.
Jansen impresses again
Marco Jansen, South Africa's 6ft 9in paceman, took 4-36 in just his third Test appearance. Since making his debut in the opening match of this series, Jansen has taken 19 Test wickets at an average of 16.47. His pace and bounce has at times been too much for India, who are perhaps the first of many Test teams who will suffer against his menace.
History repeating for Proteas?
Cheteshwar Pujara fell to just the second delivery of the morning, with Petersen producing an outstanding catch on the leap at leg slip. Now the safe hands of Petersen can guide South Africa towards victory with the bat. Only on three previous occasions have teams won by posting a score of at least 200 in the fourth innings at Newlands. One of those was in 2007, when South Africa beat India by five wickets to clinch a 2-1 series win.