Dean Elgar will retire from international cricket at the end of the two-Test home series against India that starts on Tuesday, the former South Africa Test captain said.
The opening batter has played 84 Tests and eight one-day internationals, scoring 5,146 runs at an average of 37.28 in the longest format, including 13 centuries and a career-best 199 against Bangladesh in 2017.
"Playing the game of cricket has always been a dream of mine but having the opportunity to represent your country is the ultimate," the 36-year-old said in a statement.
"Having had the privilege to do it for 12 years internationally is simply beyond my wildest dreams. It has been an incredible journey that I have been fortunate enough to have."
Elgar captained South Africa in 17 Tests before losing the armband to Temba Bavuma in January this year. He won nine and lost six of his matches in charge, most notably beating India 2-1 in a home series in 2022.
South Africa meet India in Centurion in the opening Test starting on December 26 before moving to Cape Town for the second match from January 3.