Faf du Plessis has quit as South Africa captain across all three formats of cricket, but will remain available for selection, Cricket South Africa (CSA) announced on Monday.
Du Plessis says he wants to take a step back from captaincy to allow a new generation of leaders to develop in the side, with the 35-year-old admitting earlier this year he was not looking at his future in international cricket beyond the Twenty20 World Cup in Australia in October.
Du Plessis was rested for the recent One-Day International and Twenty20 series against England, where South Africa were led by wicketkeeper Quinton de Kock.
"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 said in a statement.
"This was one of the toughest decisions to make, but I remain fully committed to supporting Quinton," he added.
Du Plessis has come under increasing pressure in recent months after a disappointing 50-over World Cup in England last year was followed by a test series thrashing in India and a 3-1 home loss to England in January.
His form with the bat has been poor as well, averaging just 20.92 in his last 14 test innings, which has led to his place in the side being questioned.
De Kock has been given public backing as an intelligent leader by South Africa coach Mark Boucher, and it appears he will take over on a permanent basis from Du Plessis in all three formats, though CSA have yet to confirm this.
"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," Du Plessis continued.
"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."
Du Plessis says his decision to quit is a "selfless" act for the greater good of the team.
"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, 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. I remain committed to play in all three formats of the game for now and will offer my knowledge and time to the new leaders of the team."
South Africa will later in the day name their squad for the three-match T20 series at home versus Australia that starts on Friday.