Umpires Aleem Dar and Ian Gould had consulted earlier because of unusual bounce and deviation on a pitch which former Indian captain Sunil Gavaskar described as “dangerous”.
After Elgar was struck late in the afternoon by a sharply lifting delivery from India’s Jasprit Bumrah, match referee Andy Pycroft joined the umpires on the field and the third day of the third and final Test was halted.
South Africa, set 241 to win, were 17 for one.
Only two Test matches have previously been abandoned because of dangerous conditions.
In January 1998, England were 17 for three against the West Indies at Sabina Park in Jamaica when the umpires stopped play because of a hazardous pitch.
And a match between the same two teams in Antigua in February 2009 was called off after 10 balls because a soft outfield was regarded as dangerous for bowlers and fielders.
India seize control
Indian captain Virat Kohli and Ajinkya Rahane had set an attacking example as India took control of the match, scoring 247 in their second innings.
Umpires Aleem Dar and Ian Gould called off play after they were joined on the field by match referee Andy Pycroft.
The captains and match officials met after the stoppage and the only official word was that play had been called off for the day.
There had been suggestions during the day that play might be halted because of a dangerous pitch but with India having completed their innings any decision to abandon the match was always likely to be controversial.
It became clear that demons remained in the pitch when Mohammed Shami had Aiden Markram caught behind in the second over and Bhuvneshwar Kumar hit Elgar with a painful blow on the right hand in the next over.
The delivery which dismissed Markram lifted and seamed away, while the ball which struck Elgar lifted sharply off a good length.
The pitch was the subject of intense discussions by the umpires and a meeting in match referee Pycroft’s office, attended by groundsman Bethuel Buthelezi and local officials, during the lunch break, when India were 100 for four.
There were areas on a good length on both ends of the pitch where the bounce was unpredictable.
Kohli and Rahane added 34 in quick time after lunch before a good spell by Kagiso Rabada, who bowled Kohli for 41 and then caught Hardik Pandya off his own bowling, reduced India to 148 for six.
But with the ball going softer, Rahane and Kumar, followed by Shami, attacked some wayward bowling. India´s last four wickets added 99 runs — crucial in a low-scoring match.
The innings was marked by good running between the wickets, while the lower order batsmen went for their shots, to the frustration of the South African bowlers.
Rahane, who was not selected for the first two Tests, made his runs off 68 balls and hit six fours in a courageous stand given the conditions.
After his partnership with Kohli set the tone for the afternoon, he and Kumar added 55 for the seventh wicket, with Kumar going on to score 33 to complete a series where he made useful contributions in each of his four innings.
With India already in a good position, Shami swung hard after Rahane had been dismissed, hitting two sixes in an innings of 27 off 28 balls.
Rabada, Vernon Philander and Morne Morkel each took three wickets amid generally inconsistent bowling.
Dropped catches also weighed heavily. Elgar put down a straightforward catch at gully off Morne Morkel when Kumar had 15 and the total was on 178, then Rahane was dropped at deep point by Andile Phehlukwayo off Kagiso Rabada when he was on 38 and the total was 180.