MYRTLE BEACH, S.C. – Federal agents arrested a man Wednesday who they say wanted to use a gun in an attack “in the spirit of Dylann Roof,” reports CBS affiliate WBTW.

Benjamin Thomas Samuel McDowell, 29, is charged with felon in possession of a firearm or ammunition, according to court documents.

Federal authorities say that on January 6 McDowell posted on Facebook Messenger that he was looking for a gun and met an undercover FBI employee about a week later at an unidentified hotel in Myrtle Beach.

Get Breaking News Delivered to Your Inbox

According to a sworn FBI statement, agents began investigating McDowell, who allegedly connected with white supremacist groups while serving previous prison sentences, after he threatened a synagogue on Facebook.

McDowell reportedly wrote that fellow white supremacists weren’t active enough: “All they wanne [sic] do is stay loaded on drugs the Jews put here to destroy white man...”

McDowell allegedly told the agent he wanted to “conduct an attack on non-whites without getting caught.”

The document says McDowell posted statements online praising Roof, but did not appear to have formulated any specific attack plans. Roof was sentenced to death for killing nine black worshippers in a Charleston church.

In one conversation, McDowell allegedly told the agent he wanted to “do something on a f****** big scale and write on the f****** building or whatever, ‘In the spirit of Dylann Roof.’”

In another alleged conversation, McDowell allegedly said “I just be plotting it out, like, I mean you just run up there on them if they back there partying, and all, with a f****** AK and rip them sumbitches down, and throw, a damn, something at them.”

Federal authorities allege McDowell bought a .40 caliber Glock and hollow point ammunition from the undercover agent on Wednesday. Agents reportedly said he was also supposed to talk about his attack plans over lunch, but the documents don’t say whether that happened. They arrested him “soon after” at the Hampton Inn on Celebrity Circle in Myrtle Beach.

A detention hearing is scheduled for Feb. 21 in Florence.

Jail records indicate he was taken from J. Reuben Long Detention Center on Thursday morning. WBTW hasn’t confirmed his new location.

McDowell doesn’t have an attorney. No one answered the phone at his mother’s home where he lives.