Hashim Amla, the only South African to score a triple Test match century, on Thursday announced his retirement from international cricket, just days after fast bowler Dale Steyn said he was quitting Tests.
Amla, 36, said he was retiring from all international cricket after a 15-year career during which he hit 55 centuries in 349 matches across all formats.
He followed record-breaking fast bowler Steyn who on Monday said he was retiring from Test cricket, although he remains available for international white-ball cricket.
"They will be missed, they are two greats of South African cricket," former international teammate AB de Villiers told Sky Sports.
"It's a big surprise about Hashim. I watched him grow into one of the world's great players."
An elegant right-handed top-order batsman, Amla overcame a shaky start in international cricket, during which his technique was criticised, to become one of South Africa’s all-time leading batsmen.
He hit 55 centuries in a 15-year international career, including South Africa's highest Test score of 311 not out against England at The Oval in 2012.
Amla scored 9,282 runs at an average of 46.64 in 124 Test matches and 8,113 at 49.46 in 181 one-day internationals.
He also made 1,277 runs in 44 Twenty20 internationals at an average of 33.60.
He hit 28 centuries in Tests and 27 in one-day internationals. His Test tally included four double centuries.
Amla said he thanked "the fans for energising me when times were tough, and for celebrating with me when we succeeded together".
Amla made his Test debut against India in Calcutta in 2004/05, scoring 24 and 2.
In the same season he played in two matches of South Africa's home series against England but was dropped after scoring only 36 runs in four innings.
Some critics believed that his backlift, which took his bat out at an angle of close to 45 degrees, was a flaw which would prevent him from having a successful international career.
He modified his technique, although still retaining a distinctive loop in his backlift, and returned to Test cricket 15 months later with his first century, 149 against New Zealand.
He became an ever-present in the South African team.
His early struggles were recalled in a tweet by former team-mate AB de Villiers.
"So many doubted u early on, but your fighting spirit, humility & incredible one of a kind talent took u to the top of the mountain," said De Villiers.
Initially regarded as a Test specialist, Amla only made his one-day international debut in 2008 but soon proved that classic stroke play, mainly as an opening batsman, was as effective as power hitting in the limited overs game.
When he was at the peak of his career, between 2010 and 2016, he had an average of above 50 in both Tests and one-day internationals, while maintaining a scoring strike rate of better than 90 runs per 100 balls in one-day games.
In recent years, though, Amla's form dropped off and he struggled at the recent World Cup in England and Wales.
His last Test century was in October 2017 and he made only two one-day international hundreds after that date.
Amla captained South Africa in 14 Test matches between 2014 and 2015/16 but seldom appeared entirely comfortable in the role.
His captaincy career started promisingly with three series wins, including one in Sri Lanka, but after a difficult tour of India in which South Africa lost three of four Tests, he resigned as captain midway through a home series against England when South Africa were 1-0 down after two matches.
Amla said he would remain available for domestic cricket as well as the second edition of the Mzansi Super League Twenty20 competition, which is due to start in November.