South African head coach Mark Boucher will quit his job after the T20 World Cup in October and November, Cricket South Africa announced on Monday.
Boucher, appointed in controversial circumstances in 2019, was due to be in charge until the end of the 2023 Cricket World Cup in India.
His shock decision means that South Africa have to appoint a new head coach before a challenging Test tour of Australia in December, which could be crucial to the country's chances of qualifying for the World Test Championship final at Lord’s in June 2023.
According to CSA's statement, Boucher has decided to resign “in order to pursue other opportunities in line with his future career and personal objectives.
"While Cricket SA greatly regrets that Mr Boucher is unable to see out the term of his contract, it respects his decision and wishes him all the best in his future endeavours."
Boucher survived criticism of his appointment in December 2019 by former captain Graeme Smith without a formal recruitment process, and charges of racism levelled by CSA after what were termed Social Justice and Nation Building hearings into alleged racism in South African cricket.
The charges were later dropped and CSA issued a statement giving its full support to Boucher.
The former Test wicketkeeper was in charge while South Africa racked up 11 Test wins and briefly headed the World Test Championship table. They are currently second after losing the third Test and the series against England earlier on Monday.
Boucher will take the team on a white-ball tour of India later this month, followed by the T20 World Cup.
CSA chief executive Pholetsi Moseki said Boucher "has helped navigate us through some rough waters following the departures of so many senior players through retirement and has helped lay some strong foundations for the next generation of Proteas".
Enoch Nkwe, who was by-passed for the head coach job and was briefly Boucher's assistant before resigning and later being appointed CSA director of cricket, said he was "deeply saddened" by Boucher's decision.
"He is a Proteas legend and has done so much for the game in our country, both on the field and over the last three years off it, which we highly appreciate," he said.
"He has built a sound platform for South Africa to flourish in all three formats and I'm sure we will see the results of that at the T20 World Cup next month."