The scandal-plagued Democratic mayor of Rochester, N.Y., who is facing felony campaign finance charges and is married to an alleged drug-trafficker, has lost her primary and won’t run as a third-party candidate, bringing an end to her tenure as head of the city after two terms.

Mayor Lovely Warren failed to fend off a primary challenge from Rochester Councilman and school board member Malik Evans, who is now the frontrunner in the city’s upcoming general election in the heavily Democratic city.

The outgoing mayor has also been indicted on campaign finance fraud charges, of which she has denied wrongdoing, and was heavily criticized over her handling of the police-involved death of Daniel Prude.

ROCHESTER, NEW YORK - SEPTEMBER 06: Rochester Mayor Lovely A. Warren addresses members of the media during a press conference related to the ongoing protest in the city on September 06, 2020 in Rochester, New York. Daniel Prude died after being arrested on March 23, by Rochester police officers who had placed a "spit hood" over his head and pinned him to the ground while restraining him. Mayor Warren announced a commitment to improve the city's response to mental health crisis. (Photo by Michael M. Santiago/Getty Images)

ROCHESTER, NEW YORK - SEPTEMBER 06: Rochester Mayor Lovely A. Warren addresses members of the media during a press conference related to the ongoing protest in the city on September 06, 2020 in Rochester, New York. Daniel Prude died after being arrested on March 23, by Rochester police officers who had placed a "spit hood" over his head and pinned him to the ground while restraining him. Mayor Warren announced a commitment to improve the city's response to mental health crisis. (Photo by Michael M. Santiago/Getty Images) (Getty Images)

Prude, a 41-year-old Black man, died while being restrained by city police officers in 2020. He was reportedly running naked down a street, banging on store windows, just hours after he was released from a mental health hospital.

ROCHESTER MAYOR LOVELY WARREN'S HUSBAND TAKEN INTO CUSTODY AMID CRIMINAL INVESTIGATION

Bodycam video shows him naked and handcuffed with a spit hood over his head, being pinned to the ground by two officers for about two minutes. He stopped breathing and was placed on life support before dying a week later.

The medical examiner ruled his death a homicide due to asphyxiation but noted that he had the drug PCP in his system – although prosecutors brought in a medical expert who told the grand jury that Prude had a heart attack caused by "excited delirium."

Elliot Shields, a lawyer for Prude’s family, told the Associated Press in April that he believed prosecutors had used the expert to undermine their own case. The officers were ultimately not indicted.

Protests erupted last summer over Prude’s death, with activists calling for Warren, who is also Black, to step down. They accused city officials of an attempted cover-up since the bodycam footage was not released until six months after his death, following family freedom of information requests.

ROCHESTER POLICE COMMAND STAFF RETIRING AFTER DANIEL PRUDE DEATH

In the aftermath of those protests, senior leaders of the Rochester Police Department announced their retirements.

Warren at the time said she had not asked them to step down. But she had been questioning their leadership.

Warren’s estranged husband, Timothy Granison, was arrested on drug charges in May after state troopers executed a search warrant at their home in connection with an alleged cocaine-trafficking ring. He pleaded not guilty.

CLICK HERE TO GET THE FOX NEWS APP

The Associated Press contributed to this report.