NASHVILLE, Tenn. (AP) – Nashville Mayor Megan Barry said she plans to continue serving in office after revealing that she had an extramarital affair with the former head of her security detail.

Standing alone in front of TV cameras as she explained herself to reporters for about 15 minutes Wednesday night, Barry apologized, saying she’s embarrassed, sad and sorry for all the pain she has caused.

The mayor also said in a news release that 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.

And she apologized to the people of Nashville, adding that she remains firmly committed to working hard to serve them. The popular mayor, who was elected in 2015, said progress has been made to offer affordable housing, improve to public education and promote better transportation options, but there’s more work to be done.

In the news conference, she said nothing illegal happened and no policies were violated. Her office released records of her text messages, calendar and travel expenses and records, and Barry said she will be transparent in cooperating with possible investigations.

“I know that God will forgive me, but that Nashville doesn’t have to,” Barry said. “And I hope that I can earn their trust and I can earn your trust back, and that you will forgive me.”

The first-term mayor’s admission follows the painful loss of the Barrys’ only son, Max, in July after an overdose on a combination of several drugs, including two opioids.

“This is a very bad day. And I’m going to have several more bad days. But this is not my worst day,” Barry said. “And I will tell you I know the difference between a mistake — I made a serious mistake — but this is not a tragedy.”

She said the affair began several months after she came into her administration. She said it was discovered through conversations between their two spouses and personal conversations. She would not say when the affair ended, only saying that it’s over.

She accumulated more than $33,000 in travel expenses combined between her and Forrest from January 2017 to late October 2017, and said all of the trips were business-related.

Forrest said on Jan. 17 that he would retire Wednesday after 31-plus years with Metro Nashville Police. He spent 14 years of that tenure supervising the mayor’s security detail over three administrations.

In his own news release Wednesday, Forrest said he never violated his oath as a police officer or engaged in actions that would abuse the public trust. The retired officer asked for privacy as he seeks to rebuild the trust of those he loves the most.

“I deeply regret that my professional relationship with Mayor Barry turned into a personal one,” Forrest said in the release. “This has caused great pain for my wife, my family, friends and colleagues.”

Barry also said she doesn’t want the affair to “muddy” the “Me Too” women’s movement.

“The ‘Me Too’ movement is about women who have been sexually harassed and economically disadvantaged for hundreds of years,” Barry said. “This is about two middle-aged, consenting adults who had feelings for each other, and were human and had failings.”