An emotional Tim Paine has quit as Australia's Test captain less than three weeks out from the Ashes after a historical sexting scandal became public.
The veteran wicketkeeper, who has been facing a race against time to be fit for the first Test against England on 8 December, was named in a News Corp report for sending explicit messages to a female co-worker.
Paine called a snap press conference on Friday afternoon to announce his resignation but insisted he would remain a member of the Test squad.
He said he sent messages to the former employee of Cricket Tasmania in late 2017, a year before he was recalled to lead the Test side.
The 36-year-old said he was "exonerated" by a subsequent Cricket Australia (CA) investigation but recently became aware the exchange would be made public.
He read a pre-written statement but did not take questions."It's an incredibly difficult decision, but the right one for me, my family, and cricket," he said.
Tim Paine runs out for Australia during the first Ashes Test at the Gabba in Brisbane in 2017. Source: Cricket Australia
"As a background on my decision, nearly four years ago, I was involved in a text exchange with a then-colleague.
"At the time, the exchange was the subject of a thorough CA integrity unit investigation, throughout which I fully participated in and openly participated in."
Paine said he was "deeply sorry" for the pain caused to his wife, family and the former Cricket Tasmania employee and apologised for damaging the reputation of the sport.
"I spoke to my wife and family at the time and am enormously grateful for their forgiveness and support," he said.
"We thought this incident was behind us and that I could focus entirely on the team, as I have done for the last three or four years.
"On reflection, my actions in 2017 do not meet the standard of an Australian cricket captain, or the wider community."
Paine was elevated to the captaincy in March 2018 when Steve Smith stepped aside following the explosive fallout from the ball-tampering scandal in South Africa.
CA says it will work through a process of appointing a new skipper. Fast bowler and vice-captain Pat Cummins was tipped to assume the role once Paine retired.
CA chair Richard Freudenstein said Paine would continue to be available for selection in the Test team through the Ashes summer.
While the board acknowledges an investigation cleared Tim of any breach of the code of conduct regarding this matter some years ago, we respect his decision," Freudenstein said.
"CA does not condone this type of language or behaviour.
"Despite the mistake he made, Tim has been an exceptional leader since his appointment and the board thanks him for his distinguished service."
Cricket Tasmania says it was only made aware of the allegations against Paine when the female employee was charged with theft in mid-2018.
Chairman Andrew Gaggin said no complaint raised at the time of the incident in November 2017, nor when the employee's position with the organisation was terminated.
"As soon as Cricket Tasmania was made aware, it undertook an investigation that determined the interaction was consensual, private, occurred on the one occasion only, was between mature adults and was not repeated," he said.
He said Cricket Tasmania does not condone "this type of behaviour" but no further action was required or appropriate because of the consensual nature of the messages.
Mr Gaggin said no further comment could be made as the woman was still before the courts.
Paine, who has played 35 Tests, is expected to play grade cricket in Hobart on Saturday on return from a neck injury.
South Australian Alex Carey is considered next in line to be Australia's Test wicketkeeper.