David Barber kept his Facebook profile set to private, but anyone who was friends with him could see the very public nature of his job — right next to the racist posts that made him lose it.

Barber, deputy director of the Shelby County Corrections Center in Memphis for the past 17 years, resigned amid a growing controversy over the posts.

One featured a picture of President Obama next to a man in a Ku Klux Klan mask and said “The KKK is more American than the illegal president.”

Another post, according to the Memphis Flyer, is about the Obama family claiming they had been discriminated against because they’re black. According to the newspaper, Barber commented, “Arrest convict hang and confiscate all assets.”

The posts were shared from the page of a group called “the Free Patriot,” which posts conservative-tinged news stories.

Recent posts from the group’s Facebook page include a video of an apparent angel that appeared over the White House after Trump’s election. Another was a story with the headline: “WARNING: Black Lives Matter Brings Riots To “White Racist Neighborhood” = BLOOD WILL SPILL -”

Barber could not be reached for comment. He was one of the top officials at a detention facility that is larger than any other “in this area of the south,” according to its website. It houses about 2,600 inmates per day and has a staff of about 1,000 people.

A news release from the Shelby County Corrections Center said Barber offered to resign “after discussing the offensive nature of the comments and the impact that would have on the corrections center.”

“Anyone in a leadership position at Shelby County government is held at a high standard of behavior, both on and off the job,” said Shelby County Mayor Mark H. Luttrell Jr.

Shelby County Commission Chairman Melvin Burgess told the Commercial Appeal that he believed Barber should have been fired immediately.

“We’re getting calls now from employees who can’t believe they’ve been working around a man with this level of insensitivity,” Burgess told the newspaper. “There is no prescription for those kinds of beliefs and attitudes. There is nowhere this should be accepted and I am disappointed in the leadership and how it was handled.”

Barber wasn’t the only official who had to resign from his position because of a problematic Facebook post this week.

After Donald Trump was elected president, Pamela Ramsey Taylor,  director of the Clay County Development Corp. in West Virginia, wrote on social media about replacing Michelle Obama with Melania Trump. “It will be so refreshing to have a classy, beautiful, dignified First Lady back in the White House. … I’m tired of seeing a Ape in heels.”

Taylor was removed from her position, and Mayor Beverly Whaling, who commented approvingly on the post, resigned.

The Ku Klux Klan was started about 200 miles away from Shelby County, in Pulaski, Tenn., according to PBS. It was started as a social club for former Confederate soldiers, but quickly grew into the most well-known hate group in the United States.

At its height, the Klan had about 4 million members, according to The Washington Post’s Kenneth Dickerman.

Read more: