A career-best performance by Shardul Thakur enabled India to fight back on the second day of the second Test against South Africa at the Wanderers Stadium on Tuesday.

Thakur took seven for 61 – the best figures by an Indian bowler in Tests against South Africa – as the hosts were bowled out for 229, a first innings lead of 27.

India reached 85 for two at the close, an overall lead of 58 runs, to finish the day on level terms and keep alive their hopes of clinching a series victory with a match to spare.

South Africa played themselves into a strong position by bowling out India for 202 on the first day and then advancing to 88 for the loss of one wicket half an hour before lunch.

Thakur, bowling at a brisk medium pace on a responsive pitch, broke South Africa’s only two partnerships of note.

He dismissed Dean Elgar (28) and Keegan Petersen (62) after the pair put on 74 for the second wicket. He followed up by having Rassie van der Dussen caught behind for one, although replays shown during the lunch interval suggested wicketkeeper Risabh Pant may have taken the ball on the bounce.

Temba Bavuma (51) and Kyle Verreynne (21) added 60 for the sixth wicket before Thakur trapped Verreynne leg before wicket and had Bavuma caught down the leg side by Pant.

Thakur then ended some tail-end resistance by taking the last two wickets off successive balls.

Thakur, 30, played a relatively minor supporting role in India’s 113-run win in the first Test in Centurion but rose to the challenge of added responsibility caused by an injury to Mohammed Siraj.

Siraj left the field clutching his right hamstring shortly before the close on Monday. He returned to action on Tuesday but only bowled six overs during the day and appeared to be below his best.

Thakur’s best in five previous Tests was four for 61 when a spate of injuries to Indian players provided him an opportunity to play a starring role in a series-clinching win against Australia in Brisbane last January. He took a total of seven wickets in the match and also top-scored with 67 in the first innings.

India’s batsmen came out with attacking intent in the second innings but left-arm fast bowler Marco Jansen had stand-in captain KL Rahul caught at third slip for eight with his fifth ball of the innings when he came on as second change.

Mayank Agarwal padded up to Duanne Olivier and was palpably leg before wicket after scoring 23.

Cheteshwar Pujara (35 not out) and Ajinkya Rahane (11 not out), both under pressure because of lack of recent form, added 41 unbeaten runs before the close.