Metropolitan Police Commissioner Dame Cressida Dick is leaving her role after a series of damaging controversies.
Dame Cressida said she had been left with "no choice" after London Mayor Sadiq Khan made it clear to her he had no confidence in her leadership.
Last week, the police watchdog found "disgraceful" misogyny, discrimination and sex harassment among some Met PCs.
Dame Cressida was the first woman to lead the UK's biggest police force.
Speaking on BBC London hours before her departure was announced, she said she was "seething angry" about the watchdog's findings and that she had "absolutely no intention" of quitting.
But in his statement, Mr Khan said he was "not satisfied" with Dame Cressida's response and that she "will be stepping aside" as a result.
Mr Khan thanked the commissioner, the first woman to lead Britain's biggest police force, for her 40-year policing career.
He said he would now "work closely with the home secretary on the appointment of a new commissioner" with an aim to restore trust in the Met.
Home Secretary Priti Patel said Dame Cressida held the role "during challenging times" and that she "exemplified the increasingly diverse nature of our police".
Dame Cressida, who served in the role for four years, has agreed with the mayor that she will continue to serve for a short time period to enable an orderly handover.
'Huge sadness'
She said in a written statement: "It is with huge sadness that following contact with the mayor of London today, 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."
"I'm incredibly proud of my team and all they have achieved," she added.
Ken Marsh, the chairman of the Metropolitan Police Federation, which represents rank and file officers in London, said Dame Cressida had been unfairly treated.
"We feel the way she has been treated is wholly unfair and we did believe that she was the person who could take us through this and bring us out the other side," he said.
BBC home affairs correspondent June Kelly said the relationship between the mayor and commissioner has to work - and once Dame Cressida had lost his confidence, and after he was so public about that, things had become toxic.
She added this was a repeat of a situation we saw more than a decade ago, when then Commissioner Sir Ian Blair was forced out by the former London Mayor Boris Johnson.
https://www.bbc.co.uk/news/uk-england-60340525
Dame Cressida said she had been left with "no choice" after London Mayor Sadiq Khan made it clear to her he had no confidence in her leadership.
Last week, the police watchdog found "disgraceful" misogyny, discrimination and sex harassment among some Met PCs.
Dame Cressida was the first woman to lead the UK's biggest police force.
Speaking on BBC London hours before her departure was announced, she said she was "seething angry" about the watchdog's findings and that she had "absolutely no intention" of quitting.
But in his statement, Mr Khan said he was "not satisfied" with Dame Cressida's response and that she "will be stepping aside" as a result.
Mr Khan thanked the commissioner, the first woman to lead Britain's biggest police force, for her 40-year policing career.
He said he would now "work closely with the home secretary on the appointment of a new commissioner" with an aim to restore trust in the Met.
Home Secretary Priti Patel said Dame Cressida held the role "during challenging times" and that she "exemplified the increasingly diverse nature of our police".
Dame Cressida, who served in the role for four years, has agreed with the mayor that she will continue to serve for a short time period to enable an orderly handover.
'Huge sadness'
She said in a written statement: "It is with huge sadness that following contact with the mayor of London today, 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."
"I'm incredibly proud of my team and all they have achieved," she added.
Ken Marsh, the chairman of the Metropolitan Police Federation, which represents rank and file officers in London, said Dame Cressida had been unfairly treated.
"We feel the way she has been treated is wholly unfair and we did believe that she was the person who could take us through this and bring us out the other side," he said.
BBC home affairs correspondent June Kelly said the relationship between the mayor and commissioner has to work - and once Dame Cressida had lost his confidence, and after he was so public about that, things had become toxic.
She added this was a repeat of a situation we saw more than a decade ago, when then Commissioner Sir Ian Blair was forced out by the former London Mayor Boris Johnson.
https://www.bbc.co.uk/news/uk-england-60340525