South Africa batting great Hashim Amla has announced his retirement from all forms of cricket at the age of 39.

Amla scored 9,282 runs during a 15-year Test career with South Africa, second only to Jacques Kallis' remarkable tally of 13,206 in the longest format.

That return included 28 Test hundreds for the Proteas, while Amla also posted the country's first triple-century with his 311 not out against England at the Oval in 2012.

As well as his efforts in Test cricket, Amla scored a further 8,113 runs – including 27 centuries – in 181 ODIs and 1,277 runs in 44 T20Is.

Having retired from international cricket in August 2019, Amla wrapped up his career in the domestic game by helping Surrey win the County Championship in 2022.

"I have great memories of the Oval ground and to finally leave it as a player fills me with immense gratitude for what has been," Amla told Surrey's website.

"A sincere thank you to [Surrey director of cricket] Alec Stewart and the entire Surrey staff, players and members for their support."

Stewart added: "Everyone at Surrey County Cricket Club will be sad to see Hashim retire, but we all applaud what has been a phenomenal career. He will quite rightly go down as a great of the game."