SAN FRANCISCO (AP) — San Francisco's mayor forced the city's police chief to resign after a series of racially charged incidents over six months that culminated when a sergeant fatally shot a young black woman driving a stolen car.

Mayor Ed Lee appointed Greg Suhr to the top job in 2011. Suhr steps down after a 36-year career and is being replaced by Deputy Chief Toney Chaplin. Chaplin, who is black, is a 26-year department veteran.

Here is a look at a few of the incidents that led to Suhr stepping down:

— On Thursday, a young black woman was shot and killed by a sergeant. A patrol car searching for stolen vehicles turned on its lights and sirens when it came upon the woman sitting behind the wheel of a parked car that had been reported stolen. Police said a witness reported that the woman then tried to drive off, but slammed into a parked truck about 100 feet away in an industrial area. A witness reported that the officers opened the driver's door and began grabbing her to try to arrest her, Suhr said. At that point, a sergeant fired one deadly round. She was identified Friday by the medical examiner as Jessica Williams, 29.

— In April, it was disclosed that three officers — including a lieutenant — had exchanged racist text messages. It was the second such scandal to rock the department since 2014 when it came to light that eight officers were exchanging racists and homophobic messages in an unrelated case. Those eight officers remain on duty because a judge ruled that Suhr waited too long to start disciplinary proceedings. The city is appealing.

— Also in April, police officers fatally shot a homeless Latino man they say was advancing on them with a knife. The death of Luis Gongora, 45, prompted Mayor Ed Lee to propose adding $17.5 million to the police department's budget over the next two years to train officers in de-escalation techniques and other reforms.

— In December, five officers shoot to death a young black man carrying a knife. Witnesses captured the shooting on video, which was circulated widely online. Suhr initially said it appeared that the suspect raised the knife in a threatening manner before he was shot. Video appears to contradict the chief's account, showing Mario Woods, 26, trying to limp away from officers with the knife at his side.

— Last year, the city paid $725,000 to settle a wrongful termination lawsuit by a former department lawyer who Suhr fired soon after he was appointed chief in 2011. The lawyer recommended that then-deputy chief Suhr be fired for failing to report a domestic violence incident he was aware of in 2009. Instead of being fire, Suhr was demoted to captain.