MYRTLE BEACH, SC (WBTW) – Federal agents arrested a man from Conway Wednesday who they say plotted an attack “in the spirit of Dylann Roof.”

Benjamin Thomas Samuel McDowell is charged with felon in possession of a firearm or ammunition, according to court documents. Jail records from J. Reuben Long Detention Center show he was booked at 4:56 p.m. Wednesday.

McDowell indicated on Jan. 6, he was looking for a gun, the feds said, and met an undercover FBI employee about a week later at an unidentified hotel in Myrtle Beach.

Court documents said McDowell connected with white supremacist groups while serving earlier prison sentences and he told the agent he didn’t want to go back to jail.

Arrest records detail McDowell’s lengthy criminal history. His rap sheet from the SC Law Enforcement Division says he was arrested on numerous counts of burglary, assault and battery, drug charges, larceny and malicious injury to personal property between 2006 and 2013.

“McDowell indicated he sought a way to conduct an attack on non-whites without getting caught,” the documents said.

Prosecutors said McDowell told the undercover employee he hadn’t decided on a place or time for the attack, but the documents describe the scale of his plans. In one conversation, McDowell  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 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.”

The feds allege McDowell bought a .40 caliber Glock and hollow point ammunition from the undercover agent on Wednesday. Agents 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.

According to the SC Attorney General’s Office, McDowell appeared before a federal magistrate judge this morning in Florence. 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. News13 hasn’t confirmed his new location.

The case is being investigated by the FBI, the Horry County Police Department and the Myrtle Beach Police Department.

McDowell was indicted on federal charges of felon in possession of a firearm on Feb. 28. His arraignment is scheduled for March 21, at 10:30 a.m. in Florence.