(CNN) -- Jacques Kallis has crowned his final Test appearance with an innings that typifies his status as one of cricket's greatest batsmen.
The 38-year-old posted a defiant 115 runs on Sunday as South Africa piled up 500 against India in the second Test of the series in Durban.
It was his 45th century in the five-day format, leaving Kallis behind only the record 51 set by Sachin Tendulkar -- who retired from the game last month.
The innings also lifted Kallis into third place in the all-time Test run-scoring standings, above Tendulkar's compatriot Rahul Dravid with 13,289 in his 166th match.
Kallis, who announced before the match that it would be his last, had resumed on his overnight score of 78.
He was dismissed soon after passing Dravid, and Dale Steyn then fell for 44, but Robin Peterson (61 off 52 balls) and Faf du Plessis (43 off 70) combined to give the top-ranked home team a first-innings lead of 166 against No. 2 India.
The tourists then slumped to 68-2 when bad light ended play on day four, still trailing by 98 overall.
While that two-Test series is evenly poised after a draw in the opening match, Australia cantered to a 4-0 lead in the Ashes against England on Sunday.
The home side will seek to inflict an embarrassing whitewash in the final Test after triumphing by eight wickets in Melbourne.
Resuming day four on 30-0 in pursuit of 231 for victory, the Australians lost just two wickets as veteran opener Chris Rogers made 116 from 155 deliveries and Shane Watson was undefeated on 83 off just 90 balls faced, hitting 11 boundaries.
Captain Michael Clarke hailed his team after bouncing back from a poor first innings, which had given England a 51-run advantage.
"I think for the first time in this series, we were behind in a Test match -- and we had to find a way to claw our way back into it," Clarke told reporters.
"We let ourselves down with the bat -- certainly our top six batters didn't bat as well as we would have liked in the first innings.
"The way our bowlers were able to turn it around -- knocking them over for 179 -- and the way we batted today, you see the real positive sides of this team."