Senior batsman Faf du Plessis on Monday stepped down as captain of South Africa's Test and T20 teams with immediate effect, citing "the need to facilitate the emergence of next generation of leaders".
The 35-year-old Du Plessis, who stepped aside from the ODI captaincy to make way for wicket-keeper Quinton de Kock during the recent series against England, said he took the decision to help South Africa start a new era.
"In a perfect world I would have loved to lead the team in the Tests for the rest of the season as well as the T20 World Cup," du Plessis said in a statement.
"But sometimes the most important attribute of a leader is to be selfless. I am healthy, fit, energised and motivated and certainly see myself playing an important role in the squad for as long as I continue putting in winning performances for the team," he added.
"When I took over the leadership, I did so with the commitment to lead, perform and most importantly, to serve. As the team heads into a new direction with new leaders and a young crop of players, I feel it will be in the best interests of South African cricket to relinquish the captaincy in all formats."
Du Plessis was rested from the three-match T20 series against England which South Africa lost 1-2 on Sunday.
His decision comes less than a week before South Africa's three-match T20 campaign against Australia, starting here on Friday followed by three ODIs against the same opposition.
"The last few weeks of rest away from the game have given me a lot of perspective on the great privilege and honour I have had in representing and leading my country in the three formats of this wonderful game," du Plessis said.
"It has been a rewarding, sometimes tough and other times a lonely road, but I would not replace the experience for anything, because it has made me the man that I am proud to be today."
Du Plessis termed the decision as one of the toughest but said he remains fully committed to help de Kock in the transition phase.
"This was one of the toughest decisions to make, but I remain fully committed to supporting Quinton, Mark (Boucher) and my teammates as we continue to rebuild and re-align as a group," said the 35-year-old right-hander.
Du Plessis took over as South Africa captain for all three formats in August 2017 after AB de Villiers stepped down.
He led South Africa to a dismal 2019 ODI World Cup campaign, where the team crashed out in the group stages.
Du Plessis, however, is expected to retain his place in the squad for the three T20s against Australia after indicating that he remains open for selection in all formats of the game.
"South African cricket has entered a new era. New leadership, new faces, new challenges and new strategies. I remain committed to play in all three formats of the game for now as a player and will offer my knowledge and time to the new leaders of the team," he said.
Speaking further on his decision, du Plessis said the last season of his captaincy career has turned out to be challenging.
"After the 2019 ICC World Cup, I made the decision to continue in my role as captain while the team went through a rebuilding phase following the retirement of some key senior players and a complete overhaul of the coaching staff that we had worked with until then.
"It was important to me that I stayed to help the team find its feet and plot a new way forward while assisting in identifying the next generation of leaders within the players' group during a time of turbulence in SA cricket," he said.
"The last season of my captaincy has been the most challenging to date as I had a lot of off-field issues that I devoted my energy towards," he added.