NASHVILLE, Tenn. -- Nashville Mayor Megan Barry revealed Wednesday that she had an extramarital affair with the former head of her security detail, apologizing and indicating she plans to continue serving in office. "I know God forgives, but the people of Nashville don't have to -- and I also want to ask for their forgiveness," Barry said Wednesday.

In a news release, 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.

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.

Get Breaking News Delivered to Your Inbox

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.

Mayor Megan Barry and her son Max Mayor Megan Barry/Facebook

She planned to address the news media Wednesday night.

"I knew my actions could cause damage to my office and the ones I loved, but I did it anyway," Barry said. "I must hold myself to the highest standard of which the voters deserve to expect. Please know that I'm disappointed in myself but also understand that I'm a human and that I made a mistake."

Forrest said on Jan. 17 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.

The 54-year-old mayor said the relationship with the 58-year-old sergeant began shortly after her election in September 2015, CBS affiliate WTVF reports. The television station had recently begun an investigation into her use of taxpayer money.

According to WTVF, Forrest had provided protection for former mayors Bill Purcell and Karl Dean, but his overtime pay had increased dramatically since Barry took office.

Police records show that he averaged $34,000 a year for the last three years of Dean's term. When Barry took office in Sept. 2015, his overtime pay increased to nearly $60,000 for the fiscal year. The next year, he avearged $75,000 in overtime pay alone, bringing his total pay $157,187, WTVF reports.

Metro Police spokesperson Don Aaron told WTVF that Barry "has kept a daunting schedule since her election."

"The overtime is a reflection of that morning to night AND weekend schedule," Aaron said.

In a 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."