(Updates at close)
* Kallis marks end of career with century
* Moves to third in all-time test runs list
* India hanging on grimly
DURBAN, Dec 29 (Reuters) - Jacques Kallis marked the end of his test career with an emotive farewell century on Sunday to give South Africa a chance of victory over India going into the last day of their brief two-match series.
India were hanging on grimly on 68 for two wickets at the end of the fourth day of the second test at Kingsmead, still 98 runs behind after Kallis' ton helped South Africa to a 166-run first innings lead.
Playing his last test, the 38-year-old all-rounder scored 115, his 45th test century, and moved into third place on the all-time list of test run scorers as South Africa were all out for 500 in their first innings shortly after tea, in reply to India's 334.
India will effectively need to bat for most of the last day on Monday to take the match beyond their hosts and avoid the potential of defeat after last week's first test ended in a dramatic draw.
Kallis, who announced his decision to quit the test arena in a surprise statement on Christmas Day, reached his ton in 273 balls to a lengthy standing ovation. It prompted a brief outpouring of emotion from the usually unflappable player.
Fifteen runs later, as he battled with hamstring cramp, Kallis passed Rahul Dravid's career tally of 13,288 runs to move behind Sachin Tendulkar (15,921 runs) and Ricky Ponting (13,378) in the list of top test batsmen.
He was out three balls after, top edging spinner Ravindra Jadeja high into the air to be caught by India wicketkeeper Mahendra Singh Dhoni.
Playing in his 166th test at the same venue where he made his debut 18 years ago, Kallis was ably supported in an extended morning session by an aggressive Dale Steyn, who had come in as the night watchman at the end of a rain-curtailed third day.
Steyn made 44 before lunch but it was after the break that a century partnership between Robin Peterson and Faf du Plessis pushed South Africa into a sizeable lead and handed them a chance for victory in a match interrupted by rain and bad light on all four days.
Peterson punished India's decision not to take the new ball until 66 overs after it was due with a brisk 61 off 88 balls. Du Plessis scored 43.
India lost a wicket early after going into bat soon after tea when Murali Vijay was caught in the slips, but thereafter weathered a barrage of fast bowling.
As the light faded in Durban, and only the spinners were allowed to continue, du Plessis took brilliant leaping one-handed catch at short mid-wicket to dismiss Shikhar Dhawan. (Reporting by Mark Gleeson; Editing by Justin Palmer; email@example.com +27828257807 Messaging firstname.lastname@example.org; l)