India take first innings lead against South Africa
Stay tunned with 24 News HD Android App
Shami reaches 200 wicket landmark as India take control
His haul saw Shami become the 11th Indian to take 200 wickets in Tests.
India reached 16 for one at the close, an overall lead of 146 runs on a pitch which is likely to offer increasingly uneven bounce over the remaining two days.
In contrast to the first day, when India made 272 for three, it was a day for the bowlers as the match resumed after the second day was rained off.
With an extra half-hour added to make up for the lost overs, 18 wickets fell for 268 runs.
South African fast bowlers Lungi Ngidi and Kagiso Rabada bowled the hosts back into the match as India lost seven wickets for 55 runs at the start of the day.
But India's fast bowlers, led by Shami, made outstanding use of the new ball on a pitch that had quickened up and which had numerous indentations, making the bounce unpredictable.
Shami bowled a relentless length at a lively pace and was rewarded with his sixth five-wicket haul in 55 Tests.
Jasprit Bumrah made the first breakthrough for India, having South African captain Dean Elgar caught behind in the first over.
But Bumrah was off the field for most of an extended afternoon session after landing awkwardly on his right ankle in following through in his sixth over.
Started the slide
Bumrah returned to the field shortly before tea but was only able to bowl again towards the end of the innings, claiming the final wicket when Keshav Maharaj was caught at short third man.
Shami bowled Aiden Markram and Keegan Petersen as South Africa was reduced to 32 for four.
Temba Bavuma and Quinton de Kock put on 72 for the fifth wicket before the latter was bowled off an inside edge by Shardul Thakur for 34 shortly before tea.
Bavuma went on to make 52 but two balls after reaching his 16th Test fifty, he was caught behind off Shami, failing to add to his only Test century, made against England in 2015/16.
Ngidi finished with six for 71 and Rabada took three for 72 as India collapsed at the start of the day.
Rabada started the slide in the fourth over of the morning when KL Rahul gloved an attempted hook to de Kock after adding only one run to the 122 he scored on the first day.
Ajinkya Rahane, the other overnight batsman, played a loose backfoot drive against Ngidi and was caught behind for 48.
Four more wickets fell in quick succession before Bumrah and Mohammed Siraj added 19 for the last wicket, prompting a change of bowlers which enabled new cap, Marco Jansen, to claim a first Test wicket when Bumrah was caught at third slip for 14.
Jansen struck with his first ball of the second innings when he had Mayank Agarwal caught behind.
India, first innings (overnight 272-3)
K Rahul c De Kock b Rabada 123
M Agarwal lbw b Ngidi 60
C. Pujara c Petersen b Ngidi 0
V. Kohli c Mulder b Ngidi 35
A. Rahane c De Kock b Ngidi 48
R. Pant c Van der Dussen b Ngidi 8
R. Ashwin c Maharaj b Rabada 4
S. Thakur c De Kock b Rabada 4
Mohammed Shami c De Kock b Ngidi 8
J. Bumrah c Mulder b Jansen 14
Mohammed Siraj not out 4
Extras (b4, lb4, nb11) 19
Total (105.3 overs) 327
Fall of wickets: 1-117 (Agarwal), 2-117 (Pujara), 3-199 (Kohli), 4-278 (Rahul), 5-291 (Rahane), 6-296 (Pant), 7-296 (Pant), 8-304 (Thakur), 9-308 (Shami)
Bowling: Rabada 26-5-72-3 (11nb), Ngidi 24-5-71-6, Jansen 18.3-4-69-1, Mulder 19-4-49-0, Maharaj 18-2-58-0
South Africa, first innings
D. Elgar c Pant b Bumrah 1
A. Markram b Mohammed Shami 13
K. Petersen b Mohammed Shami 15
H. van der Dussen c Rahane b Mohammed Siraj 3
T. Bavuma c Pant b Mohammed Shami 52
Q. de Kock b Thakur 34
W. Mulder c Pant b Mohammed Shami 12
M. Jansen lbw b Thakur 19
K. Rabada c Pant b Mohammed Shami 25
K. Maharaj c Rahane b Bumrah 12
L. Ngidi not out 0
Extras (lb4, nb7) 11
Total (62.3 overs) 197
Fall of wickets: 1-2 (Elgar), 2-25 (Petersen), 3-30 (Markram), 4-32 (Van der Dussen), 5-104 (De Kock), 6-133 (Mulder), 7-144 (Bavuma), 8-181 (Jansen), 9-193 (Rabada)
Bowling: Bumrah 7.2-2-16-2, Mohammed Siraj 15.1-3-45-1 (1nb), Mohammed Shami 16-5-44-5, Thakur 11-1-51-2 (6nb), Ashwin 13-2-37-0
India, second innings
K. Rahul not out 5
M. Agarwal c De Kock b Jansen 4
S. Thakur not out 4
Extras (b1, nb2) 3
Total (1 wkt, 6 overs) 16
Fall of wicket: 1-12 (Agarwal)
Bowling: Rabada 3-0-7-0 (2nb), Ngidi 2-1-4-0, Jansen 1-0-4-1
Match situation: India lead by 146 runs with nine wickets remaining