A mayor in Alabama has apologized for a Facebook post suggesting that homosexuals, abortion rights advocates and others should be killed.

Carbon Hill Mayor Mark Chambers in a Facebook post on Friday wrote in all caps, "We live in a society where homosexuals lecture us on morals, transvestites lecture us on human biology, baby killers lecture us on human rights and socialists lecture us on economics," according to WBRC-TV in Birmingham, which saved screenshots of the remarks.

Mark Chambers, mayor of Carbon Hill, Alabama. carbonhill.org

Carbon Hill is a city of less than 2,000 people, the majority of whom are white, according to the most recent census data. The city is 60 or so miles northwest of Birmingham.

Chambers faced swift backlash online for the post and for an exchange with one of his Facebook friends.

"By giving the minority more rights than the majority," the friend wrote. "I hate to think of the country my grandkids will live in unless somehow we change and I think that will take a revolution."

According to screenshots, Chambers responded: "The only way to change it would be to kill the problem out. I know it's bad to say but without killing them out there's no way to fix it."

Chambers initially denied he wrote the remarks.

“I don’t think I posted that," he told NBC affiliate WSFA in Montgomery, Alabama, on Monday. "I think that’s somebody else’s post."

Questioned further by the station about the Facebook page — which contained birthday greetings and pictures of his family — particularly about whether someone was posing as him on the social media platform, he said, "I don't know."

On Tuesday, Chambers issued a lengthy apology on Facebook.

“I and I alone am responsible for the comment that was made,” Chambers wrote on the now-deactivated page. “Although I believe my comment was taken out of context and was not targeting the LGTBQ community, I know that it was wrong to say anyone should be killed."

Chambers, who was elected in 2014, also said, “I am truly sorry that I have embarrassed our City, I love this City and while in office I have done everything in my power to make this a better place for our families.”

Chambers could not be reached Wednesday for comment.

The National Center for Transgender Equality asked Chambers in a tweet, "Mark, are you aware that in nearby Montgomery, a Black trans woman named Dana Martin was the first known trans person murdered this year?

The Human Rights Campaign in Alabama on Tuesday condemned the mayor's remarks, describing them as "horrifying, unconscionable and unacceptable."

"Carbon Hill Mayor Mark Chambers recently endorsed and defended his own social media posts in which he called for LGBTQ people to be killed," the organization said in a statement. "LGBTQ people face disproportionate levels of violence and harassment in their daily lives — a fact that is especially true in Alabama, where there are no statewide LGBTQ-inclusive nondiscrimination or hate crimes laws."

The Human Rights Campaign also said that Chambers should be held accountable and that as an elected official, he should "at the bare minimum," protect his constituents.