Article continues below
Ajinkya Rahane was closing in on his first home Test century after steering India away from trouble on the opening day of their series-ending match against South Africa in Delhi.
India have already wrapped up the series, leading 2-0, with interest in the fourth Test centring on whether they can avoid defeat to confirm their move up to second place behind South Africa in the Test rankings.
Until Rahane swung to their rescue, it appeared those plans were in early jeopardy as they crashed to 139 for six, including Virat Kohli's bizarre dismissal after he had cruised to 44.
The skipper crashed a full-blooded sweep into Temba Bavuma at short-leg only to see the ball balloon up and wicketkeeper Dane Vilas dive in front of him to make the catch.
Kohli's exit precipitated a mini-collapse of three for three, but if India felt that was a sign it was not their day, Rahane failed to read the script as he studiously set about piecing the innings together with an unbeaten 89.
That helped the hosts reach stumps, brought forward six overs by bad light, at 231 for seven. South Africa's highest score in a low-scoring series is just 214.
The Proteas made three changes after a disappointing series so far - they will return home beaten for the first time in nine years - and were rewarded for shuffling the deck. Recalled duo Kyle Abbott and Dane Piedt were the only two bowlers to take a wicket.
Abbott made a strong case ahead of the start of the Test series against England later this month, with three for 23, while off-spinner Piedt delivered twice as many overs as any other bowler in returning four for 101.
Piedt was playing just his second Test, after making his debut against Zimbabwe last year, but bowled 34 overs in comparison to just seven from leg-spinner Imran Tahir.
The 25-year-old rewarded the faith of his captain AB de Villiers by taking four of the first five India wickets to fall, including Kohli, as South Africa's other change Bavuma made an important, if involuntary, mark of his own on the day.
Kohli and Rahane had embarked on a fluent 70-run stand when the India skipper suffered his moment of misfortune before Rohit Sharma and Wriddhiman Saha quickly followed on the cusp of tea.
Rahane led the fightback after the break by reaching his first home half-century - only five of his 22 Test have been in India - from 91 balls.
While he lost Ravindra Jadeja to a smart Dean Elgar catch at midwicket, following a 59-run stand, Ravichandran Ashwin stuck alongside him for the remainder of a profitable final session which saw India add 92 for the loss of one wicket.