The London Metropolitan Police chief Cressida Dick has resigned from her job after losing the backing of the city's Mayor Sadiq Khan.

The Commissioner has faced a series of scandals during her time leading Britain's biggest police force - most recently violently racist, misogynist and homophobic messages exchanged by officers based at Charing Cross police station that were published by a watchdog.

The force also faced criticism over its apparent hesitation to launch an investigation into alleged parties held in Downing Street and the Cabinet Office during lockdown.

And there was fury over the rape and murder of Sarah Everard by a serving officer, as well as the force's actions following her death in tackling a vigil held in her memory during coronavirus restrictions, and issuing clumsy advice telling women in trouble to flag down a passing bus that later had to be retracted.

Last summer the notorious 1987 unsolved murder of Daniel Morgan also hit the headlines, with an independent panel accusing the Metropolitan Police of institutional corruption over the case.

In a statement, Cressida Dick announced she was stepping down from the job, despite hours earlier having insisted she had no intention of going.

She said: "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."

Hours earlier, when asked by the BBC if she should step down she said: "I have absolutely no intention of going and I believe that I am and have been, actually for the last five years, leading a real transformation in the Met."

The Mayor of London Mr Khan had earlier this week indicated that Commissioner Dick's future hung in the balance over her response to problems with the culture within the Met, and how to restore the public's confidence in the force.

On Thursday he said: "Last week, I made clear to the Metropolitan Police Commissioner the scale of the change I believe is urgently required to rebuild the trust and confidence of Londoners in the Met and to root out the racism, sexism, homophobia, bullying, discrimination and misogyny that still exists.

"I am not satisfied with the Commissioner's response.

"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."

British Prime Minister Boris Johnson paid tribute to Cressida Dick.

On Twitter he said she had "served her country with great dedication and distinction over many decades".

The British Home Secretary Priti Patel, who has reportedly had past clashes with Commissioner Dick, praised her "steadfast dedication".

Meanwhile, Ken Marsh, chairman of the Metropolitan Police Federation, said: "Cressida Dick should have been given the opportunity and the necessary time to build back trust in the Metropolitan Police Service. She has been denied that. She should have been treated better.

"We will now, like all Londoners, await to see who politicians deem fit to lead the Metropolitan Police Service in 2022 and beyond. And to see who is willing to take up that challenge."