|Kallis was supported by the South African tail to set a Monday total that India struggled to work towards [AFP]
An unbeaten 114-run stand between Gautam Gambhir and Sachin Tendulkar in Cape Town have helped India swing the series-deciding third Test against South Africa back in its favour on the second day.
Gambhir reached 65 not out and Tendulkar supported with an unbeaten 49 as India recovered from 28-2 to end with 142-2 - 220 runs behind the Proteas' first-innings 362.
In the seesaw battle, which India have to win for a first series triumph in South Africa, Jacques Kallis earlier scored 161 - his 39th Test hundred - as the home team lost its last six wickets for 100 runs on Monday.
Kallis, who was first well supported by Paul Harris, put on 52 for the last wicket with Lonwabo Tsotsobe to pass 150 for the first time in his home city, Newlands.
Shanthakumaran Sreesanth led India's bowlers with 5-99.
Opening batsman Virender Sehwag made only 13 before South Africa captain Graeme Smith dived forward to scoop up a low catch at mid-off after the batsman tried to drive an away-swinger from Dale Steyn.
Gambhir and Rahul Dravid suffered a few scares before Dravid was run out in bizarre fashion for five.
Gambhir edged a drive off left-arm seamer Lonwabo Tsotsobe to gully, where Alviro Petersen was unable to hold a difficult diving catch.
But AB de Villiers reacted quickly, sliding to stop the ball, quickly getting back to his feet and throwing down the stumps as Dravid attempted a quick single.
Sreesanth bowled Ashwell Prince for 47 with a magnificent ball that jagged back sharply to hit the left-hander's off-stump and the next delivery nipped away to have Mark Boucher caught behind for a golden duck.
Sreesanth added the wicket of Morne Morkel, caught behind for eight edging a wild drive, in a marvellous spell of three for 29 that gave him his third five-wicket haul in his 24th Test.
But the fiery paceman also incurred the umpires' wrath for his continual verbal sniping at the batsmen.
Zaheer Khan chipped in with the wicket of Steyn, caught behind for a duck, but Kallis found the support he was seeking from the obdurate Harris.
The lanky spinner hung around for 55 minutes in scoring seven as 27 runs were added for the ninth wicket.
Kallis and Australian Ricky Ponting have scored 39 Test centuries, joint second on the all-time list behind Tendulkar who has 50.