AB de Villiers has resigned as South African Test captain, opening the way for Faf du Plessis to take over the role on a permanent basis, Cricket South Africa says.
De Villiers, 32, has been struggling with an elbow injury for six months and has been ruled out of the three-match home Test series against Sri Lanka starting on Boxing Day.
De Villiers made his debut against England in 2004 and has become a crucial part of the South African unit.
The affable South African said he couldn't continue as permanent captain because he couldn't guarantee he would be back on the field any time soon.
"The interests of the team must always outweigh the interests of any individual, including me," de Villiers said.
"It was a fantastic honour for me to be asked to captain the Test side but I have missed two series and I am still in doubt for the upcoming series against Sri Lanka.
Following the squad's outstanding performances in Australia, it is clearly in the greater interests of the team that Faf du Plessis should be confirmed as the permanent Test captain."
Despite efforts to make the recent away Test series against Australia, de Villiers only had his first net session since undergoing surgery on his elbow last Tuesday.