She lost her job as mayor of Nashville, had her rising reputation damaged by a messy two-year affair with her bodyguard and pleaded guilty to theft. But at least Megan Barry has a really good mug shot.

The telegenic former chief executive of country music’s hometown was booked Tuesday before she pleaded guilty to misappropriating more than $10,000 in city funds to carry on her scandalous affair with Robert Forrest, who supervised the mayor’s security detail. Barry, 54, announced her resignation soon after.

"While my time as your mayor concludes today, my unwavering love and sincere affection for this wonderful city and its great people shall never come to an end," an emotional Barry said as she resigned.

She concluded: “God bless this wonderful city. I love you Nashville.”

Earlier Tuesday, Barry agreed to reimburse the city $11,000 in restitution, and serve three years of probation after pleading guilty to criminal theft.

"Thank you judge," she said after entering the plea in a Nashville courtroom. "I appreciate you."

In an unusual move, District Attorney Glenn Funk handled the case personally, the Tennessean reported. He said that “had this case gone to trial, witnesses are available who would testify that in March 2016 and January 2018 Megan Barry caused over $10G but less than $60G in Metro Nashville city funds to be expended unlawfully on Mr. Robert Forrest.”

Barry was seen a rising star among Democrats until her admission of the affair with Forrest derailed her first term in office. She became mayor in September 2015.

In a separate court proceeding Tuesday, Forrest also pleaded guilty to criminal theft in connection with the affair.

He agreed to pay $45,000 restitution to the city, the Tennessean reported. He was also ordered to served three years probation.

NUDE PHOTOS FOUND ON PHONE OF NASHVILLE MAYOR'S EX-LOVER, INVESTIGATORS SAY

Barry's departure elevated Vice Mayor David Briley to the job and he was sworn in on Tuesday. Briley, a Democrat like his predecessor, promised transparency and said he would work to earn back the public's trust.

Barry admitted to the affair Jan. 31. At the time she vowed to remain in office.

“I know that God will forgive me but Nashville doesn’t have to,” she said then.

With her resignation on Tuesday, Barry is the first mayor in Nashville to leave office before the end of their term in nearly a century.

The revelation of the affair led to an internal 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. Her husband, a college professor, has tweeted in support of her since the scandal broke.

Forrest, who had spent more than 31 years with Metro Nashville Police and supervised the mayor's security detail over three administrations, has retired. His wife is divorcing him.

LAW FIRM SELECTED TO INVESTIGATE NASHVILLE MAYOR'S USE OF PUBLIC MONEY DURING AFFAIR

A special committee of Nashville city council members was also probing Barry and Forrest's travel and overtime expenses.

In addition, a group of local activists has filed an ethics complaint against Barry. They claim that her relationship with Forrest compromised her in making decisions related to law enforcement.

The Associated Press contributed to this report.