Lovely Warren, the embattled mayor of Rochester, New York, admitted Monday that she violated campaign finance rules during her 2017 reelection campaign and, as part of her plea deal, will vacate the office by December. 

The plea deal will also settle weapons and child endangerment charges she faced, the Democrat & Chronicle reported. She could have faced prison time if she went to trial and was convicted, the paper reported. She did not respond to questions from reporters after the hearing.

In July, Warren and husband Timothy Granison pleaded not guilty to charges stemming from a police raid that allegedly turned up a rifle and pistol, and her 10-year-old daughter alone, in the home they share.

Warren, who was once seen as a promising Democrat, and her two co-defendants each pleaded guilty to a misdemeanor charge of accepting campaign contributions that exceeded legal limits, according to the Monroe County district attorney’s office. She was set to leave office in January after losing in the primary in June to a city councilman. Deputy Mayor James Smith is expected to finish out the remainder of her term.

Jennifer Lewke, a reporter at WHEC, tweeted that Warren admitted in court to "knowingly and willingly accepting excess campaign funds in violation of election law." She was asked how she wanted to plea and responded, "Guilty, your honor."

Warren later took to Facebook to post, "Leaving the past behind and looking forward to a brighter future. Thank you, Rochester. We’ve accomplished a lot together, but in the end, I thank God that I’m able to choose family over everything."

She had been under heavy criticism for the city’s handling of the suffocation death of Daniel Prude, a Black man who died in March 2020, a week after being held by police officers against the pavement until he stopped breathing. Prude had bolted from his brother’s home and shed his clothes during an apparent mental health episode.

Carrie Cohen, her lawyer, said the plea to a misdemeanor -- not the initial felony charges -- held true to her earlier statement that funds paid to her PAC were not categorized correctly, according to the New York Times.

GET THE FOX NEWS APP

"There never was any allegation of theft of any campaign or other funds by the mayor, or anybody else involved in the campaign," she said.

The Associated Press contributed to this report