A tearful Darren Lehmann said on Thursday he would quit as coach of the scandal-tainted Australia cricket team after the fourth and final Test of the ongoing series in South Africa.
"This will be my last Test as head coach of the Australian cricket team," Lehmann told a press conference on the eve of the match.
"Saying goodbye to the players was the toughest thing I have ever had to do.
"After seeing events in the media today with Steve Smith and Cameron Bancroft, the feeling is that Australian cricket needs to move forward and this is the right thing to do.
"I really felt for Steve and as you see I'm crying in front of the media. All the players are really hurting."
Lehmann, who was due to leave the job after the 2019 Ashes series in England, is quitting despite being cleared of any role in the ball-tampering scandal that has rocked the sport.
His decision follows 12-month bans given to captain Smith and vice-captain David Warner for the roles they played in a plot to cheat in Cape Town last Saturday during the third Test.
Opening batsman Bancroft was banned for nine months for his part in the affair.
"As a team we know we've let so many people down and for that we're truly sorry," added the 48-year-old Lehmann.
"The players involved have been handed down very serious sentences and they know they must face the consequences. They have made a grave mistake but they are not bad people."
Lehmann said the scandal had affected him and his family.
"My family and I have copped a lot of abuse over the last week and it's taken its toll," added the 48-year-old Lehmann.
"I am ultimately responsible for the culture of the team and I've been thinking about my position for a while.
"Despite telling media yesterday that I'm not resigning, after viewing Steve and Cameron's hurting, it is only fair that I make this decision."
Lehmann was hailed as a saviour when he took over in 2013, but critics now accuse him of overseeing a toxic culture that has dented the reputation of the famed Baggy Green cap.
After being appointed, Lehmann's response when asked to list his top three priorities was telling.
"Probably win, win, win, for a start," he told reporters.
Cricket Australia (CA) had other ideas when it gave him the job.
"Discipline, consistency of behaviour and accountability for performance are all key ingredients that need to improve," chief executive James Sutherland said at the time.
If part of Lehmann's brief was to improve the Australian team's behaviour, there is little doubt he has failed.
Players were once considered role models for children, but the situation has become so bad that CA is setting up an independent review into the team's conduct and culture.
Even Prime Minister Malcolm Turnbull has weighed in to criticise the practice of sledging -- taunting opponents verbally with the aim of distracting them.
Australian Broadcasting Corporation senior cricket commentator Jim Maxwell said the coach had to accept some blame for an "arrogant" team culture where certain players felt cheating was preferable to losing honourably.
"He's done a very good job with the side but has a very narrow view of the way players should conduct themselves," Maxwell said.
Lehmann became national coach after Australia sacked the first foreigner to hold the post, South African Mickey Arthur, on the eve of an Ashes series.
A respected former batsman who played 27 Tests and 117 one-day internationals for Australia, Lehmann was seen as an antidote to the disciplinarian Arthur.
Australia lost Lehmann's first Ashes series in charge but later in 2013, after he had stamped his mark on the team, they crushed England 5-0 in ruthless fashion.
The Australians have been successful under him, with a Test record of 30 wins, 19 losses and eight draws.