Du Plessis, De Villiers defy Indian bowlers
South African batsman AB de Villiers blocks a shot from Indian bowler Ravichandran Ashwin during their first Test in Johannesburg on December 22, 2013
South Africa, set an unlikely 458 to win, were 331 for four at tea on the fifth and final day. With a minimum of 30 overs remaining, there remained a possibility that South Africa might achieve a world record run chase.
Du Plessis (88 not out) and De Villiers (72 not out) came together before lunch and batted through the afternoon session with only minimal alarms on a pitch which played reasonably easily, although there was still some uneven bounce and deviation from a cracked surface.
Du Plessis and De Villiers, who were schoolmates in Pretoria, had added 134 for the fifth wicket at tea.
The partnership was launched after Zaheer Khan claimed his 300th Test wicket when he won a leg before wicket decision against Jacques Kallis, South Africa's senior batsman.
Kallis, who made 34, look surprised when he was given out by umpire Rod Tucker. Replays showed the ball had come off an inside edge.
In a series in which the decision review system is not being used, it was the first major error made by umpires Tucker and Steve Davis.
Fast bowler Shami bowled Alviro Petersen in the fifth over of the day, after South Africa resumed at 138 for two, with Petersen failing to add to his overnight score of 76.
Petersen played a tentative defensive shot to a ball outside his off stump and was bowled off an inside edge.
Kallis, who was leg before wicket first ball to a full delivery from Ishant Sharma in the first innings, came within millimetres of suffering a similar fate to the first ball he faced from Shami.
It was full and struck Kallis on the pads but umpire Steve Davis ruled correctly that it was just outside the line of leg stump.
Kallis, who failed to reach double figures in six of his previous seven Test innings, struck Shami through the covers for four in his next over to open his score but was then dropped by Cheteshwar Pujara at short leg, with the fielder getting his left hand to the ball but failing to hold a sharp chance.
After his initial struggles, Kallis batted with authority to score his 34 runs off 37 balls before he was given out.
At that stage there were 74.2 overs remaining and India were favourites to close out victory, but Du Plessis continued to play an anchor role, while De Villiers played positively.
The world record for a successful run chase is 418 for seven by the West Indies against Australia in St John's in 2002/03.