A 114-run partnership for the third wicket allows the visitors to hold steady after Sreesanth's fiver limits South Africa to 362 despite Kallis's 161.
Gambhir and Tendulkar restore order for India
CAPE TOWN // Jacques Kallis scored his 39th Test century and was the last man out after a magnificent 161 as South Africa were bowled out for 362.
But it was India that held the edge at the end of the second day of the series-decider at Newlands after Shanthakumaran Sreesanth's wonderful spell of bowling with the second new ball tilted the game their way.
By the end of play, Gautam Gambhir and Sachin Tendulkar had added 114 for the third wicket and with the pitch expected to be best for batting on day three, India have at least a decent chance of becoming the only side other than Australia to win here since 1962.
Such a turnaround looked extremely unlikely as South Africa, resuming on 232 for four, negotiated the first half-hour of play with scarcely an alarm.
But as soon as the 80 overs were up, MS Dhoni had Zaheer Khan take the new ball. Ishant Sharma shared it, but after one over from him, Sreesanth was brought on.
His fifth delivery, which he called "the best I've ever bowled to a left-hander", came out with the seam bolt upright and hit the pitch well outside off stump. It then darted back sharply to clip the top of the off stump, leaving Ashwell Prince bemused as he walked off.
The next ball moved away off the seam and took the edge of Mark Boucher's bat on its way through to Dhoni.
Suddenly, South Africa were down to the tail and it showed in the urgency with which Kallis played his shots.
Zaheer got Dale Steyn with a short delivery and Morne Morkel gave Sreesanth a five-wicket haul with a wild flail, but what followed was intensely frustrating for India. Paul Harris helped Kallis add 27 for the ninth wicket, before Lonwabo Tsotsobe showed both a straight bat and plenty of guts during the course of a 52-run stand.
Through it all, Kallis, who struck some lovely drives and stunning pulls, had batted with a reductor muscle strain that will rule him out for at least a fortnight.
He will bat again if necessary but his absence as fourth seamer was keenly felt as India recovered from a wretched start.
Steyn dismissed Virender Sehwag for the seventh time in 10 Tests, checking a drive to Graeme Smith at mid-off, and Rahul Dravid's woes in South Africa continued when he was run out in bizarre circumstances.
Gambhir edged Tsotsobe to gully, where Alviro Petersen could only palm the ball behind. AB de Villiers ran back from second slip and threw the stumps down with Dravid still short of the crease.
Another failure in the second innings, and an epic 12,000-run Test career could be over.
Gambhir accumulated runs as he usually does, clipping the ball off his pads and driving it square, while Tendulkar produced a couple of gorgeous drives in an otherwise unremarkable innings.
Consolidation was clearly the name of India's game and they went through the final session with no further damage.
Sreesanth, who used to be a legspinner before being moulded as a seam bowler at the MRF Pace Foundation in Chennai where Dennis Lillee was his coach, stressed on the importance of patience.
"They were in a hurry to play those balls," he said. "So maybe I was lucky to get wickets. Hitting the seam really helps, especially when playing outside India."
For Kallis, it was a third successive century on his home ground. "I grew up watching cricket here, missing school and all that," he said with a satisfied smile after what must rank as one of his best innings.
"In South Africa, it's important you know where off stump is. You grow up on such pitches, and when in form, life is a lot easier.
"India bowled pretty well. But the tail showed guts and I thought we did well to get 360."
Without his ability to bowl though, his teammates could struggle a bit if the sun shines on the third day.
South Africa 1st Innings:
Alviro Petersen c Dhoni b Sharma 21
Graeme Smith lbw b Khan 6
Hashim Amla c Pujara b Sreesanth 59
Jacques Kallis c Dhoni b Khan 161
AB de Villiers c Dhoni b Sreesanth 26
Ashwell Prince b Sreesanth 47
Mark Boucher c Dhoni b Sreesanth 0
Dale Steyn c Pujara b Khan 0
Morne Morkel c Dhoni b Sreesanth 8
Paul Harris c Pujara b Sharma 7
Lonwabo Tsotsobe not out 8
Extras: (1b, 6lb, 1w, 11nb) 19
TOTAL: (all out, 112.5 overs) 362
Fall of wickets: 1-17, 2-34, 3-106, 4-164, 5-262, 6-262, 7-272, 8-283, 9-310, 10-362.
Bowling: Zaheer Khan 29.5-6-89-3 (2nb), Shanthakumaran Sreesanth 29-0-114-5 (6nb, 1w), Ishant Sharma 27-6-77-2 (3nb), Harbhajan Singh 27-3-75-0.
India 1st Innings:
Gautam Gambhir not out 65
Virender Sehwag c Smith b Steyn 13
Rahul Dravid run out (De Villiers) 5
Sachin Tendulkar not out 49
Extras: (8lb, 1w, 1nb) 10
TOTAL: (for two wickets, 50 overs) 142
Fall of wickets: 1-19, 2-28.
Bowling: Dale Steyn 13-4-31-1, Morne Morkel 14-3-46-0 (1nb, 1w), Lonwabo Tsotsobe 12-3-28-0, Paul Harris 11-2-29-0.