A man who allegedly plotted to carry out an attack “in the style of Dylann Roof” has been arrested - but not charged under any terrorism laws.

Benjamin Thomas Samuel McDowell, 29, was detained by the FBI in South Carolina on Wednesday for illegally buying a gun with the intention of carrying out a mass shooting “against non-whites”. He was charged with possession of a fire arm.

According to an affidavit from the FBI that was filed in federal court, Mr McDowell had told an undercover FBI agent he was interested in “doing something on a f***ing big scale” and writing “in the spirit of Dylann Roof” on the wall of the building where he would commit the killings. Roof was sentenced to death in January for killing nine black churchgoers in Charleston.

The document, which is in the public domain, states that Mr McDowell had “established White Supremacy Extremist connections while serving prison sentences in South Carolina for various criminal offenses,” adding that his “tattoos on his extremities indicated his affiliation with the WSE (white supremacist extremists)”.

In the months leading up to his arrest, Mr McDowell had reportedly posted a number of anti-Semitic messages on Facebook, including on the page of Temple Emanu-El Conservative Synagogue in Myrtle Beach, accusing Jews of plotting to wipe out the white race.

According to the FBI affidavit, on 5 January Mr McDowell wrote on Facebook: “All they wanna do is stay loaded on drugs the Jews put here to destroy white man and they fest on the drugs”, and went on to chastise other white supremacists for not having “the heart to fight for Yahweh like Dylann Roof”. A day later he reportedly posted that he was looking to buy a gun.

The FBI had been monitoring Mr McDowell’s activity, and he was subsequently intercepted by an undercover agent posing as someone who “handled problems for the Aryan Nations” under the pretence that he was selling him a firearm. Mr McDowell then expressed his desire to carry out the “mass shooting”.

Appearing before a federal magistrate court on Thursday, Mr McDowell was charged for a violation of “possessing of a firearm and ammunition by a prohibited person”.

A statement from the District of South Carolina attorney’s office read: “McDowell was arrested for a violation of possession of a firearm and ammunition by a prohibited person, a violation of Title 18, United States Code, Section 922(g)(1).”

Mr McDowell remains in custody, with a detention hearing scheduled for 21 February.

The controversial orders Donald Trump has already issued Show all 9 1 /9 The controversial orders Donald Trump has already issued The controversial orders Donald Trump has already issued Trump and the media White House Press Secretary Sean Spicer takes questions during the daily press briefing Getty Images The controversial orders Donald Trump has already issued Trump and the Trans-Pacific Partnership Union leaders applaud US President Donald Trump for signing an executive order withdrawing the US from the Trans-Pacific Partnership negotiations during a meeting in the Roosevelt Room of the White House in Washington DC. Mr Trump issued a presidential memorandum in January announcing that the US would withdraw from the trade deal Getty The controversial orders Donald Trump has already issued Trump and the Mexico wall A US Border Patrol vehicle sits waiting for illegal immigrants at a fence opening near the US-Mexico border near McAllen, Texas. The number of incoming immigrants has surged ahead of the upcoming Presidential inauguration of Donald Trump, who has pledged to build a wall along the US-Mexico border. A signature campaign promise, Mr Trump outlined his intention to build a border wall on the US-Mexico border days after taking office Getty Images The controversial orders Donald Trump has already issued Trump and abortion US President Donald Trump signs an executive order as Chief of Staff Reince Priebus looks on in the Oval Office of the White House. Mr Trump reinstated a ban on American financial aide being granted to non-governmental organizations that provide abortion counseling, provide abortion referrals, or advocate for abortion access outside of the United States Getty Images The controversial orders Donald Trump has already issued Trump and the Dakota Access pipeline Opponents of the Keystone XL and Dakota Access pipelines hold a rally as they protest US President Donald Trump's executive orders advancing their construction, at Columbus Circle in New York. US President Donald Trump signed executive orders reviving the construction of two controversial oil pipelines, but said the projects would be subject to renegotiation Getty Images The controversial orders Donald Trump has already issued Trump and 'Obamacare' Nancy Pelosi who is the minority leader of the House of Representatives speaks beside House Democrats at an event to protect the Affordable Care Act in Los Angeles, California. US President Donald Trump's effort to make good on his campaign promise to repeal and replace the healthcare law failed when Republicans failed to get enough votes. Mr Trump has promised to revisit the matter Getty Images The controversial orders Donald Trump has already issued Donald Trump and 'sanctuary cities' US President Donald Trump signed an executive order in January threatening to pull funding for so-called "sanctuary cities" if they do not comply with federal immigration law AP The controversial orders Donald Trump has already issued Trump and the travel ban US President Donald Trump has attempted twice to restrict travel into the United States from several predominantly Muslim countries. The first attempt, in February, was met with swift opposition from protesters who flocked to airports around the country. That travel ban was later blocked by the Ninth Circuit Court of Appeals. The second ban was blocked by a federal judge a day before it was scheduled to be implemented in mid-March SANDY HUFFAKER/AFP/Getty Images The controversial orders Donald Trump has already issued Trump and climate change US President Donald Trump sought to dismantle several of his predecessor's actions on climate change in March. His order instructed the Environmental Protection Agency to reevaluate the Clean Power Plan, which would cap power plant emissions Shannon Stapleton/Reuters

It comes shortly after Mr Trump said in a joint press conference with Israeli Prime Minister Benjamin Netanhayu that he would “stand with Israel in the struggle against terrorism”, saying the US had “a long history of cooperation in the fight against terrorism”.

During his inauguration speech in January, Mr Trump focused attention on taking a hard-line stance against “radical Islamic terrorism”, saying the US would unite the civilised world against radical Islamic terrorism which we will eradicate completely from the face of the earth.”