A white supremacist planned a terror attack “in the spirit of Dylann Roof ” on a South Carolina synagogue, the FBI alleges.

Benjamin Thomas Samuel McDowell, 29, of Conway, South Carolina was arrested Wednesday for allegedly attempting to buy a gun from an undercover agent posing as a hitman for the Aryan Nations. McDowell is a convicted felon and legally prohibited from buying firearms. McDowell allegedly sought the weapon after spending the past month writing Facebook posts about murdering Jews and praising Roof, who was convicted of murdering nine black churchogers in Charleston in June 2016 .

According to an FBI affidavit filed Thursday, McDowell’s internet activity suggested that he set his sights on the Temple Emanu-El, a conservative synagogue in Myrtle Beach.

“I love love to act what u think,” [sic] he wrote in a December Facebook post linking to the synagogue's website.

Contacted by The Daily Beast on Thursday, the temple declined to comment, citing an ongoing investigation.

McDowell had already been convicted on multiple felony charges of animal abuse, violent burglary, larceny, drugs, and assault. During his time in prison for those offenses, police said he developed connections to white supremacists.

According to the FBI, McDowell elaborated on his preferred form of “action” on Facebook.

“Dylann roof did what these tattoos wearing so badass is supposed to be doing they don't give f*** about their white race,” he wrote on January 5. “All they wanne do is stay loaded on drugs the Jews put here to destory white man and they feast on the drugs. they should be Feasting on the enemy that stole their Heritage and their bloodline and trying to run us off of this Earth you can post pictures off****** Viking and swords all the s*** you want to post if you ain't got the heart to fight for Yahweh like dylann roof did you need to shut the f******up damn right I'm pissed off when I see a f******white young and disable beat him to death before f******n****** and white people running:their f******mouth not doing nothing!!!!!! !damn right I'm pissed off'.”

The following day, McDowell allegedly sent a Facebook message to an undercover FBI agent posing as a member of the Aryan Nations. McDowell asked for “iron,” slang for a gun.

When McDowell met the undercover agent at a Myrtle Beach hotel several days later, he supposedly told the agent that “screaming ‘white power’” would not be enough to accomplish his goals.

"I got the heart to do that shit, but I don't have the good training," the agent quoted McDowell saying.

McDowell said Roof inspired him to take up arms.

"I seen what Dylann Roof did and in my heart I reckon I got a little bit of hatred and I … I want to do that shit. Like, I got desire ... not for nobody else … it just... I want something where I can say, 'I fucking did that' ... me personally ... If l could do something on a fucking big scale and write on the fucking building or whatever, 'In the spirit of Dylann Roof."'

But unlike Roof, who was arrested and later sentenced to death, McDowell told the agent he planned to get off with murder “scot-free”.

But he continued to post his murderous intent to Facebook even after the meeting.

“Clean up world jewelry [sic] in the name of Yahweh,” he wrote on January 25, in apparent reference to “Jewry.”

Heidi Beirich, director of the Southern Poverty Law Center’s Intelligence Project said the language was a call-out to sect of white supremacist Christianity.

“Where he talks about cleaning up world jewry in the name of Yahweh, that’s a term for God that’s used by members of a particular Christian sect: a white supremacist version called ‘Christian Identity,’” Beirich told The Daily Beast. “The language in here shows he was deeper into white supremacist thinking. It’s not some surface-level thing. If he knew about Yahweh and he knew about Christian Identity, he’d been spending some time studying white supremacy.”

Anti-Semitic hate crimes have surged since Donald Trump’s election. In New York City, Jews were the victim of twice as many hate crimes in the first two months of 2017 than during that same period in 2016, the according to the NYPD . Jewish centers nationwide have reported a spike in graffiti and threatening phone calls, with approximately 60 bomb threats called into Jewish community centers in January, CNN reports .

In his January 25 post, McDowell called on white supremacists to be more like Roof.

“I wish the day we all get off Facebook and white Warriors like we was born to be like Dylan roof but we gotta do it in a smart away and it takes a team it takes no drugs and party and more planning for the real Victory and not just saying it but should want Bloodshed 2 crave it and be a fanatic for your white race and for Yahweh God they've been murder and.killed our birth rites of our white race,” he wrote.

The following day, McDowell allegedly called the undercover agent to explain his plans.

"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 fucking AK and rip them sumbitches down, and throw, a damn, something at them,” McDowell allegedly told the agent. He asked the agent to buy him a gun and ammunition.

The alleged murder plot went on hold for weeks, after McDowell allegedly told agents that his mother would not allow him to continue using her cell phone for calls. There was also the matter of paying for the gun and ammunition; McDowell allegedly told agents he needed to ask his grandfather for money. None of McDowell’s family members returned The Daily Beast’s requests for comment.

But on February 11, McDowell allegedly called the agent to say the plot was back on. They agreed to meet at a Myrtle Beach Hampton Inn to finish the deal.

McDowell arrived at the hotel on February 15 with $109 in hand to allegedly buy the gun. Instead, he found himself swarmed by federal agents. He is scheduled for a preliminary hearing on Tuesday, a state official told The Daily Beast.

“I think this was a guy who was pretty well ensconced in white supremacist thinking, down to the point where he knew the slogans, the buzzwords, and so on,” the SPLC’s Beirich said. “I’m not surprised to see him praising Dylann Roof. He’s not the only white supremacist who sees Dylann Roof as a hero, a martyr to the cause.”