Cape Town: Hashim Amla resigned as South Africa captain immediately after his side drew the second Test against England.
The 32-year-old had been in poor form but made a double century to inspire his side's fightback after England made 629-6 declared in Cape Town.
"I believe I can be of greater value as a fully focused batsman and senior player at this time," said Amla.
AB de Villiers will lead South Africa in the third Test, which starts in Johannesburg on 14 January.
Since his appointment as successor to Graeme Smith in June 2014, Amla captained the Proteas in 14 Tests winning four, drawing six and losing four.
"I am deeply grateful and privileged to have been the Test captain. It was enjoyable and indeed a great learning experience," said Amla.
De Villiers, who already leads the one-day side, said: "It is an incredible honour to captain South Africa in any format. The captaincy has obviously come at short notice and is the realisation of a lifelong dream.
"At the moment my priority and focus is placed on leading this team to what can be a memorable series win against England. This Test squad is motivated and determined to turn our performances around and I'm looking forward to taking up that challenge as captain.
"Hashim is a good friend and close colleague and I am grateful for his support."
Cricket South Africa chief executive Haroon Lorgat said: "He still has a huge role to play in shaping the success of our team without the need for a leadership title. He is just that type of a person and we are very fortunate to have him in our stable.
"I want to thank AB for readily accepting the challenge of rebuilding our Test team as we seek to remain the best team in the world."