The head of London's Metropolitan Police force is leaving her role.
Cressida Dick said she felt she had "no choice" but to resign, after being criticised by London Mayor Sadiq Khan.
Mr Khan said it is clear "the only way to start to deliver the scale of the change required is to have new leadership right at the top".
He put Ms Dick "on notice" last week, after the police watchdog there published messages sent by officers that used sexist, racist and homophobic language.
He said his entire trust in the force hinged on her coming up with a robust plan for dealing with the behaviour.
But he said he was "not satisfied" with her response and in a statement on Thursday evening said: "On being informed of this, Dame Cressida Dick has said she will be standing aside.
"It's clear that the only way to start to deliver the scale of the change required is to have new leadership right at the top of the Metropolitan Police."
It is understood Mr Khan had called the commissioner in for a meeting at 4.30pm on Thursday.
However she did not attend, submitting her resignation instead.
Later, she said she felt she had "no choice" but it was "with huge sadness" she was stepping down.
Announcing her resignation, she cited the murder of Sarah Everard as having "damaged confidence" in the police service.
Ms Dick said: "It is clear that the mayor no longer has sufficient confidence in my leadership to continue.
"He has left me no choice but to step aside as commissioner of the Metropolitan Police service".
She added: "The murder of Sarah Everard and many other awful cases recently have, I know, damaged confidence in this fantastic police service.
"There is much to do - and I know that the Met has turned its full attention to rebuilding public trust and confidence."
Ms Dick will continue to serve for a short period to enable an orderly handover.
Following the announcement, British Prime Minister Boris Johnson thanked her for "protecting the public and making our streets safer".
Her resignation comes following a series of scandals including the murder of Sarah Everard by serving officer Wayne Couzens, and an exchange of racist, misogynist and homophobic messages by officers at a London police station.
Additional reporting: IRN