Allister Coetzee has stepped down as South Africa's rugby coach following a string of poor results and a leaked letter in which he alleged that officials were undermining him.
SA Rugby said in a statement that "it had reached an agreement with Allister Coetzee to part ways with immediate effect".
After only 11 victories in 25 Tests during two years guiding the Springboks, there had been increasing media speculation that the 54-year-old faced the sack.
"First and foremost we had to assess what is in the best interests of the Springboks," Jurie Roux, head of SA Rugby, said.
"We'd like to thank Allister for his passion and dedication to the Springbok cause and wish him every success in his next role."
Coetzee said in the statement: "I have always held Springbok rugby dear to my heart and will continue to do so and for that reason I think now is the time the team and me strike out in new directions."I wish Springbok rugby every success in the future - as I have always done."
In a recent leaked letter, the former inter-provincial scrum-half said his efforts to build a team capable of winning the 2019 Rugby World Cup in Japan were being severely hampered by officials.
In the letter to SA Rugby, Coetzee angrily alleged that officials "embarked on a deliberate attempt to undermine me from the word go.
"(This) creates a public impression of incompetence on my part while wilfully obstructing my efforts to be successful," he wrote.
"I will fight to protect my hard-earned reputation."
South Africa lost a calendar-year record eight Tests, including at home to Ireland, away to Argentina and to Italy for the first time.The Springboks were also humiliated 57-15 by bitter rivals New Zealand in Durban, a record home loss.
When Coetzee succeeded Heyneke Meyer in 2016, he did not have time for pre-season camps and had no say in the selection of support staff.
Last year, Coetzee got the assistant coaches he wanted after a reshuffle and the team underwent extensive pre-season training, but there was only a slight improvement in performances.
South Africa did win seven Tests, but six came against poorly performing France and Argentina, and the other against traditional European minnows Italy.
Among four 2017 losses were a 57-0 drubbing in New Zealand, a 38-3 thrashing in Ireland, and a 24-22 loss to a virtual Wales 'B' team.
Coetzee did not win a Test against a team ranked higher in the world.
Before becoming national coach, Coetzee developed the Cape Town-based Western Stormers into the consistently most successful of the South African sides in Super Rugby.
He then worked with a Japanese club before becoming only the second black coach of the Springboks after Peter de Villiers.