San Francisco's police chief has resigned at the request of the city's mayor, hours after an officer shot dead a young black woman driving a stolen car.
The shooting was the culmination of several racially-charged incidents in the past year.
Pressure had been mounting for the resignation of Greg Suhr since December, when five officers shot dead Mario Woods, a young black man carrying a knife. Since then there have been protests, moves to reform the police department and a government review.
Mayor Ed Lee supported the chief in December and again in April, after it was disclosed that three officers had exchanged racist text messages.
The texting scandal was the second to rock the department after it emerged that several officers had exchanged racist messages dating back to before Mr Suhr was chief.
But he was criticised for moving too slowly to sack the offending officers, all of whom have retained their jobs because of the chief's failure to start disciplinary action when he first found out about the inappropriate messages.
Mr Suhr could not be reached for comment on Thursday.
Protesters demanding his resignation drowned out the mayor's second inaugural speech in January, and demonstrators forced Mr Lee to abandon a planned speech on Martin Luther King Day later that month.
Nonetheless, the mayor stood behind Mr Suhr and the two announced a series of reforms aimed at reducing police shootings and called in the US Department of Justice to review the department's policy and procedures.
Mr Suhr renewed his call for reform on April 8 after an officer shot dead a Latino homeless man who police said refused orders to drop a large knife.
But he lost Mr Lee's backing on Thursday, after a patrol car trawling an industrial area for stolen vehicles came across a 27-year-old black woman sitting behind the wheel of a parked car.
Police said the car had been reported stolen.
Officers turned on the patrol car's lights and siren and the woman sped off. A few seconds later and about 100 feet away, the vehicle smashed into a parked truck.
The officers jumped out of the police car and raced to the wreckage, where the woman was revving the car in an effort to free the vehicle. Mr Suhr said a witness reported that the officers opened the driver's door and began grabbing the woman in an attempt to arrest her.
At that point, a sergeant fired one fatal round.
"This is exactly the kind of thing with all the reforms we are trying to prevent," Mr Suhr said on Thursday, less than two hours after the shooting and before he resigned.
The mayor said he asked for and received Mr Suhr's resignation.
"The progress we've made has been meaningful, but it hasn't been fast enough," he said in a brief statement at City Hall. "Not for me, not for Greg."
Neither the police nor the San Francisco medical examiner has identified the woman, who was shot in the same neighbourhood where the five officers shot and killed Mr Woods, 26.
Video of Mr Woods' shooting circulated widely online and led to protests and calls for Mr Suhr's resignation.
But at the time, the chief still enjoyed the backing of the mayor and other community leaders, who said they wanted to give Mr Suhr time to implement the reforms he promised.
"Some of the reforms under way might have prevented or clarified today's incident," the mayor said on Thursday. "We need to turn these plans into actions."
Mr Lee appointed Mr Suhr, a 34-year veteran of the department who rose through the ranks despite several professional missteps, as police chief in 2011.
He was demoted from deputy chief to captain in 2009 after failing to file a police report after a woman friend told him she had been assaulted by her boyfriend.
Last year the city paid $725,000 to settle a wrongful termination lawsuit filed by a former department lawyer who recommended Mr Suhr be sacked for failing to report his friend's assault. Mr Suhr fired the lawyer when he became chief.
Mr Suhr was also reassigned from head of patrol in 2005 to guarding the city's water supply - widely viewed as a demotion.
Two years earlier, he was one of several officers indicted in the city's so-called "Fajitagate" for allegedly trying to cover up an investigation of three off-duty officers who had beaten up a waiter and took his bag of Mexican food. The indictment was thrown out.
The mayor has appointed Mr Suhr's deputy, Toney Chaplin, a black officer with 26 years in the department, as the city's acting police chief.
"Toney Chaplin has the charisma, chemistry and courage to lead this department," said the Rev Amos Brown, president of the San Francisco chapter of the National Association for the Advancement of Coloured People (NAACP).
Mr Brown, like the mayor, also supported Mr Suhr throughout the department's turmoil. He said the problems with the department in particular and police in general "are bigger than one man".