South Africa's captain Faf du Plessis(L)speaks with teammate AB de Villiers during a training session at The Wankhede Cricket Stadium in Mumbai on March 17, 2016. /PUNIT PARANJPE/AFP/Getty Images

AB de Villiers has resigned as South Africa's Test captain, making way for Faf du Plessis to take over from de Villiers on a permanent basis.

De Villiers was handed the captaincy in January but could only manage to lead the side in two Tests against England, before missing the next six months with an elbow injury.

The 32-year-old missed a home series against New Zealand and the recent visit to Australia, and will now also be absent for the Proteas' three-Test series against Sri Lanka.

"The interests of the team must always outweigh the interests of any individual including me," he said in a Cricket South Africa press release.

"It was a fantastic honour for me to be asked to captain the Test side but I have missed two series.

"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 permanent Test captain.

"I have known Faf for almost 20 years, ever since we played in the same school side at Afrikaans Hoer Seunskool, and he will have my unequivocal support."

Du Plessis will now take over as the Test captain, and will be the third player to lead the side permanently since the retirement of former skipper Graeme Smith in March 2014.