Kallis, who scored a brilliant 155 in South Africa's first innings total of 450, was unbeaten on 57 as the tourists reached 171-5 at lunch at the National Stadium here, having an overall lead of 330.
The tourists, looking for a match-winning margin on a spin-friendly pitch, resumed on 76-3 with a steady Kallis and Ashwell Prince. The duo took the score to 132 without facing any problems.
Kallis, who reached fifty with his fourth boundary in the penultimate over before lunch, added an invaluable 88 runs for the fourth wicket with Prince, who made a patient 45.
But the home team captured two wickets for just one run to raise hopes of a fightback.
Leg-spinner Danish Kaneria, surprisingly kept out of attack in the first hour, provided the home team with the much-needed breakthrough.
Left-arm spinner Abdul Rehman then baffled AB de Villiers with a sharp turner to bowl the batsman for one.
Debutant Rehman, who took four wickets in the first innings, was the pick of home bowlers with 3-67.
Kallis, again the model of concentration, had been at the crease for nearly three hours, as he tamed the spinners with confidence to strengthen South Africa's position.