South Africa coach Mark Boucher will leave his post after the Twenty20 World Cup in Australia later this year to pursue "other opportunities in line with his future career and personal objectives", officials said on Monday.
The announcement came hours after South Africa lost their three-match Test series in England.
Former wicketkeeper Boucher, who played 147 Tests for South Africa, has been in the role since December 2019 and had been contracted until the end of the 2023 50-over World Cup in October next year.
"We would like to thank Mark for the time and effort he has invested in South African cricket as the head coach over the past three years," Cricket South Africa CEO Pholetsi Moseki said in a media statement.
"He 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.
"We are extremely grateful to him for the work he has done and would like to wish him well with the next chapter of his career."
Boucher has generally won praise for improving South Africa’s Test and white ball cricket, though the recent five-day series in England was woeful for the batsmen with no quick fix to that problem in sight.
The highlight of his tenure to date was a home Test series win over India in January, which has helped South Africa reach second place in the ICC Test World Championship table.
Boucher will be at the helm for the limited overs side on their India tour before the Twenty20 World Cup, after which the red ball side will travel to Australia for three Tests starting in December by which time a new coach will be in place.