Nashville Mayor Megan Barry resigned Tuesday and pleaded guilty to a felony theft charge, a month after the rising Democratic star admitted to an affair with her bodyguard.

"While my time today as your mayor concludes, my unwavering love and sincere affection for this wonderful city and its great people will never come to an end," she said at a news conference shortly after she appeared before a judge and pleaded guilty.

In court, Barry didn't say how she stole money from the city, but an investigation found that she was engaged in her relationship with her bodyguard while on city-paid trips. Authorities also found a nude photo and partially nude photo of a woman that were taken while her bodyguard, Sgt. Robert Forrest, 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.

The nude and partially nude photos were shot last May and October, on days that Barry's travel schedule shows she was on separate Washington trips.

Shortly after the mayor's resignation, Forrest pleaded guilty to the same theft charge and agreed to reimburse the city $45,000 that was paid to him as salary or overtime when he was not performing his duties as the mayor's security detail.

The investigation found the photos on Forrest's work email and said they had been taken by his phone. There were also 260 deleted chats between Forrest's phone and Barry's phone number as well as 35 deleted call logs, an affidavit said.

The mayor agreed to reimburse the city $11,000. Both Barry and Forrest were sentenced to three years of probation.

Barry, 54, was riding high when news broke in late January that she had been having an affair with Forrest. She acknowledged the affair but denied any wrongdoing and rebuffed calls for her resignation.

Elected in 2015, she had maintained a high profile in the city, appearing routinely at concerts and public events and spearheading a successful effort to bring professional soccer to Nashville. She was the point person for a $5.4 billion transit plan that Nashville voters will consider in a citywide referendum in May.

She will hand over the reins to Vice Mayor David Briley, a liberal Democrat who ran unsuccessfully for mayor in 2007.

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, according to an affidavit.

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.

The Tennessee Bureau of Investigation is looking into the matter and says its investigation "remains active and ongoing."