Tim Paine has stepped down as Australia Test captain just before the Ashes over a historical investigation into texts sent to a female colleague.
A tearful Paine, 36, said he had sent messages to a co-worker at Cricket Tasmania in 2017 that led to a misconduct investigation.
He said he was "exonerated", but is stepping down as he had learned his texts were set to be publicly revealed.
The first Ashes Test between Australia and England starts on 8 December.
Cricket Australia (CA) said it accepted Paine's resignation and will appoint a new captain, but that the wicketkeeper-batter will remain in the side to face England.
Fast bowler Pat Cummins, the current vice-captain, is widely expected to take over as captain.
Tasmania's Paine was appointed captain in 2018 following Steve Smith's ban over a ball-tampering scandal.
Paine revealed the historic investigation in a press conference on Friday, describing stepping down as "an incredibly difficult decision but the right one for me, my family and cricket".
He said: "Although exonerated, I deeply regretted this incident at the time and still do today.
"I spoke to my wife and family at the time and am enormously grateful for their forgiveness and support.
"On reflection, my actions in 2017 do not meet the standard of an Australian cricket captain, or the wider community."
Paine did not disclose the nature of the texts, but CA's news website called it a "sexting incident involving a former Cricket Tasmania employee in 2017".
Paine added: "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.
"That investigation and a Cricket Tasmania HR investigation at the same time found that there had been no breach of the Cricket Australia code of conduct."