(Updates at close, adds quotes)
* Kallis scores 87th test half century
* De Villiers and Kallis put on 127 for fourth wicket
* South Africa trail India by 35 runs with five first innings wickets remaining
DURBAN, Dec 28 (Reuters) - Jacques Kallis inched closer to scoring a century in his final test after guiding South Africa to 299 for five before rain and bad light brought a premature end to the third day of the second test against India on Saturday.
Kallis, who is playing his final test before retiring, faced 224 balls for his unbeaten 78 in what could be his last test innings. He took the Proteas to within 35 of India's first innings score.
The 38-year-old notched up his 87th half-century in tests and will resume day four with nightwatchman Dale Steyn (zero not out).
South Africa lost JP Duminy (28) just before the close, one of four wickets for Indian spinner Ravindra Jadeja (four for 87).
All-rounder Kallis was the junior partner in an excellent fourth-wicket stand of 127 with AB de Villiers (74) that got South Africa out of trouble earlier in the day.
De Villiers, who bagged a century to help save the first test in Johannesburg and has amassed at least 50 in each of his last 10 test matches, looked fluent again as he scored all around the ground before edging to Virat Kohli at first slip off the bowling of Jadeja.
The South African vice-captain said it was a privilege to spend so much time at the crease with Kallis.
"I personally have a lot of fond memories batting with Jacques, I scored my first test hundred with him when he was at the wicket, I was there for both his double-hundreds," De Villiers said in a pitchside interview.
"He has meant so much to me in my career, I probably wouldn't be here today if it wasn't for all the advice (he gave me) on and off the field throughout my career."
The pair steadied the innings after a mini-collapse in the morning session when the hosts lost three wickets for 10 runs.
The home side had started the day well, Graeme Smith (47) and Alviro Petersen (62) moving the side briskly from their overnight score of 82 and adding 21 runs before the former was excellently caught by Shikhar Dhawan running towards the boundary at cover off the bowling of Jadeja.
Hashim Amla had a wretched time in the drawn first test in Johannesburg, out twice leaving deliveries that crashed on to his stumps, and he failed with the bat again on Saturday.
This time he played a shot but the result was the same, the excellent Mohammed Shami getting the ball to move away slightly and clip the off-stump and dismiss him for three.
That brought Kallis to the crease and India, showing great sportsmanship, gave the veteran all-rounder a guard of honour as he walked to the middle, with Australian umpires Steve Davis and Rod Tucker joining in.
But perhaps the emotion of the moment led to Petersen losing his concentration as he was out the very next delivery, gloving the ball to Murali Vijay at slip off the bowling of Jadeja.
JP Duminy became Jadeja's fourth victim when he was trapped leg before wicket in the penultimate over before the umpires took the players off the field as rain began to fall.
"The game is very much in the balance. Keeping in mind that we are batting last on the wicket... we need a lead of 100," De Villiers said.
"The wicket is doing a bit which will make it difficult for us to get that lead."
Jadeja added: "The pitch is getting slower and slower so we just have to get them all out as early as possible and in the second innings if we bat well, we can put a good score on the board." (Reporting by Nick Said,; editing by Pritha Sarkar)