South Africa went to lunch on 102-4 against India on the second day of the second test on Tuesday after losing three quick wickets right before the break.

The Proteas were cutting into India's first-innings lead and were 100 runs behind after bowling out the tourists for 202 on the first day.

More Images
South Africa's captain Dean Elgar, bats as India's wicketkeeper Risabh Pant, middle, watches on, during the second day of the 2nd Test Cricket match between South Africa and India at the Wanderers stadium in Johannesburg, South Africa, Tuesday, Jan. 4, 2022. (AP PhotoThemba Hadebe)

South Africa went to lunch on 102-4 against India on the second day of the second test on Tuesday after losing three quick wickets right before the break.

India's captain Virat Kohli leaves the field before the start of the second day of the 2nd Test Cricket match between South Africa and India at the Wanderers stadium in Johannesburg, South Africa, Tuesday, Jan. 4, 2022. (AP PhotoThemba Hadebe)

Thakur had 3-8 off 4.5 overs to revive India, which is seeking a first test series win in South Africa and can clinch that bit of history with victory at the Wanderers. India leads the three-test series 1-0.

South Africa's captain Dean Elgar watches his shot during the second day of the 2nd Test Cricket match between South Africa and India at the Wanderers stadium in Johannesburg, South Africa, Tuesday, Jan. 4, 2022. (AP PhotoThemba Hadebe)

His session-changing spell took South Africa from 88-1 to 102-4.

India's bowler Mohammed Shami, right, reacts after his delivery against South Africa's batsman Keegan Petersen, during the second day of the 2nd Test Cricket match between South Africa and India at the Wanderers stadium in Johannesburg, South Africa, Tuesday, Jan. 4, 2022. (AP PhotoThemba Hadebe)

India's bowler Mohammed Shami, right, reacts after his delivery against South Africa's batsman Keegan Petersen, during the second day of the 2nd Test Cricket match between South Africa and India at the Wanderers stadium in Johannesburg, South Africa, Tuesday, Jan. 4, 2022. (AP PhotoThemba Hadebe)

India's bowler Shardul Thakur, right, celebrates with teammate taking a wicket of South Africa's captain Dean Elgar, during the second day of the 2nd Test Cricket match between South Africa and India at the Wanderers stadium in Johannesburg, South Africa, Tuesday, Jan. 4, 2022. (AP PhotoThemba Hadebe)

India's bowler Shardul Thakur, right, celebrates with teammate taking a wicket of South Africa's captain Dean Elgar, during the second day of the 2nd Test Cricket match between South Africa and India at the Wanderers stadium in Johannesburg, South Africa, Tuesday, Jan. 4, 2022. (AP PhotoThemba Hadebe)

But what looked like being an extremely strong session for South Africa at the Wanderers unraveled a little in the space of six overs at the end as captain Dean Elgar (28), Keegan Petersen (62) and Rassie van der Dussen (1) all fell in a blistering three-wicket burst by medium-pacer Shardul Thakur.

South Africa's captain Dean Elgar, bats as India's wicketkeeper Risabh Pant, middle, watches on, during the second day of the 2nd Test Cricket match between South Africa and India at the Wanderers stadium in Johannesburg, South Africa, Tuesday, Jan. 4, 2022. (AP PhotoThemba Hadebe)

South Africa's captain Dean Elgar, bats as India's wicketkeeper Risabh Pant, middle, watches on, during the second day of the 2nd Test Cricket match between South Africa and India at the Wanderers stadium in Johannesburg, South Africa, Tuesday, Jan. 4, 2022. (AP PhotoThemba Hadebe)

Thakur had 3-8 off 4.5 overs to revive India, which is seeking a first test series win in South Africa and can clinch that bit of history with victory at the Wanderers. India leads the three-test series 1-0.

Thakur's fabulous spell changed the dynamic of the day after South Africa made solid progress from its overnight score of 35-1. Elgar and Petersen combined for a 74-run partnership and Petersen registered his first test half-century.

Thakur got Elgar caught behind by wicketkeeper Rishabh Pant, tempted Petersen into a big drive which he edged to the slips, and had Van der Dussen caught by Pant off an inside edge.

India's captain Virat Kohli leaves the field before the start of the second day of the 2nd Test Cricket match between South Africa and India at the Wanderers stadium in Johannesburg, South Africa, Tuesday, Jan. 4, 2022. (AP PhotoThemba Hadebe)

India's captain Virat Kohli leaves the field before the start of the second day of the 2nd Test Cricket match between South Africa and India at the Wanderers stadium in Johannesburg, South Africa, Tuesday, Jan. 4, 2022. (AP PhotoThemba Hadebe)

His session-changing spell took South Africa from 88-1 to 102-4.

More AP cricket: https://apnews.com/hub/cricket and https://twitter.com/AP_Sports

South Africa's captain Dean Elgar watches his shot during the second day of the 2nd Test Cricket match between South Africa and India at the Wanderers stadium in Johannesburg, South Africa, Tuesday, Jan. 4, 2022. (AP PhotoThemba Hadebe)

South Africa's captain Dean Elgar watches his shot during the second day of the 2nd Test Cricket match between South Africa and India at the Wanderers stadium in Johannesburg, South Africa, Tuesday, Jan. 4, 2022. (AP PhotoThemba Hadebe)

India's bowler Mohammed Shami, right, reacts after his delivery against South Africa's batsman Keegan Petersen, during the second day of the 2nd Test Cricket match between South Africa and India at the Wanderers stadium in Johannesburg, South Africa, Tuesday, Jan. 4, 2022. (AP PhotoThemba Hadebe)

India's bowler Mohammed Shami, right, reacts after his delivery against South Africa's batsman Keegan Petersen, during the second day of the 2nd Test Cricket match between South Africa and India at the Wanderers stadium in Johannesburg, South Africa, Tuesday, Jan. 4, 2022. (AP PhotoThemba Hadebe)

India's bowler Shardul Thakur, right, celebrates with teammate taking a wicket of South Africa's captain Dean Elgar, during the second day of the 2nd Test Cricket match between South Africa and India at the Wanderers stadium in Johannesburg, South Africa, Tuesday, Jan. 4, 2022. (AP PhotoThemba Hadebe)

India's bowler Shardul Thakur, right, celebrates with teammate taking a wicket of South Africa's captain Dean Elgar, during the second day of the 2nd Test Cricket match between South Africa and India at the Wanderers stadium in Johannesburg, South Africa, Tuesday, Jan. 4, 2022. (AP PhotoThemba Hadebe)