PRETORIA- Seamer Ishant Sharma bagged a brace of wickets to keep India in the hunt for victory as South Africa crawled to 230 for seven at tea in their second innings on the fourth day of the second test on Tuesday.

The home side scored just 57 runs in 27 overs in the session to extend their lead to 258, leaving India needing a record chase in tests at Centurion Park to win the game.

But on a wicket that is more similar to Indian conditions than those typically found in South Africa, and key batsman Virat Kohli in excellent form, they may well fancy their chances of levelling the series having lost the first test in Cape Town, if they can get the last three home wickets quickly after tea.

South Africa captain Faf du Plessis (37) and Kagiso Rabada (zero) will resume in the evening session and will want to push their side past a 300-run lead.

The previous record chase in Pretoria was 251 for eight by England in 2000, but that was on a fresh wicket after both sides forfeited innings to force a result.

South Africa had resumed on 173 for five after lunch as Du Plessis and Vernon Philander (26) compiled a sixth wicket partnership of 46 from 26 overs, before the latter lost his patience and attempted a hook off Sharma (2-40) that picked out Murali Vijay at mid-wicket.

Keshav Maharaj (6) became Sharma's second victim in the session when he edged to wicketkeeper Parthiv Patel having failed to get in line to a ball that bounced steeply.

The slow scoring rate was in contrast to some brisk shot-making in the morning session, despite an excellent spell of bowling from seamer Mohammed Shami (3-42).

AB de Villiers reached 80 before a rising delivery from Shami conjured an edge to Patal.

He had put on 141 for the third wicket with opener Dean Elgar, who rode his luck to a half-century before he found Lokesh Rahul in the deep with a well-timed pull shot off Shami and was gone for 61.

Quinton de Kock (12) looked completely out of sorts and after edging three balls in a row past the slips for four, his luck ran out and he brushed a Shami delivery to Patel.

(Reporting by Nick Said, editing by Ed Osmond and Christian Radnedge) ((nick.said@thomsonreuters.com;))