NASHVILLE -- A month after she admitted to an extramarital affair with her then-bodyguard, Nashville Mayor Megan Barry has pleaded guilty to theft of property and resigned. When Barry first admitted Jan. 31 to having an affair with Sgt. Robert Forrest, she said she planned to stay in office. But on Tuesday she said her time in office has concluded.

Barry's guilty plea earlier in the day included an agreement for her to resign. She was also fined and sentenced to three years of probation.

The development follows several days of negotiations between Barry's legal team and District Attorney Glenn Funk, CBS affiliate WTVF reported. The negotiations apparently focused on whether Funk would agree not to prosecute Barry in exchange for her resignation.

A booking photo of Megan Barry Metropolitan Nashville Police Department

In court, Funk said that had the case gone to trial, witnesses would have testified that between March 2016 and February 2018 Megan Barry caused over $10,000 and no less than $60,000 of Metro Nashville city funds to be expended unlawfully. =

Get Breaking News Delivered to Your Inbox

The revelation of the affair derailed the first term of a mayor who was seen as a rising star among Democrats. It led to an investigation, which found probable cause that a nude photo and partially nude photo of a woman found on Forrest's work cellphone were taken while he was working and the two were engaging in their relationship while he was on duty. The Tennessee Bureau of Investigation did not identify the woman in the photos and Barry has said that if the photos are of her, they were taken without her knowledge or permission.

Metro Nashville Police records show Forrest's overtime more than doubled in the budget year after Barry was elected in September 2015. Barry said the affair began in spring 2016, an affidavit said.

Barry has not said when the affair ended, only that it's over. Forrest, who had spent more than 31 years with Metro Nashville Police and supervised the mayor's security detail over three administrations, has retired.

In a news release in late January, the mayor said she accepts full responsibility for the pain she caused her family and the family of Sgt. Robert Forrest, her former security chief. She apologized to her husband, Bruce, who she said remains committed to their marriage. She also apologized to the people of Nashville, adding that she remains firmly committed to working hard to serve them.

"I know God forgives, but the people of Nashville don't have to -- and I also want to ask for their forgiveness," she said in January.