An American man who stood in elections for the US Congress has admitted plotting to attack a Muslim community, shooting residents and burning down a mosque.

Robert R. Doggart, 63, was arrested by the FBI before he could carry out the plan to “utterly destroy” Islamberg, a village in New York state.

Posts on his Facebook page, tapped phone calls and conversations with police sources revealed the plot to attack on 15 April, setting fire to key buildings and killing anyone who resisted with guns or machetes.

According to a plea agreement filed at the US District Court of the Eastern District of Tennessee, Doggart wrote a Facebook post in February saying: “Target 3 [Islamberg] is vulnerable from many approaches and must be utterly destroyed.”

Robert Doggart stood in last year's Congress elections as an independent (Capitol)

He met several co-conspirators in different parts of the state, justifying the carnage by claiming that residents were “planning a terrorist attack”, legal documents published by Heavy said.

They planned to burn down buildings including a mosque, a school and a cafeteria, shooting anyone who tried to stop them.

In a phone call to an FBI source on 6 March, Doggart was recorded saying: “Those guys have to be killed. Their buildings need to be burnt down. If we can get in there and do that not losing a man, even the better.”

He issued advice on guns, telling people to arm themselves with AR-15 and M-16 rifles.

Doggart, who ran as an independent candidate for the 4th Congressional District of Tennessee in 2014, admitted planning to carry an M4 carbine and offered to arm the FBI source with “the meanest shotgun on Earth”.

Doggart advised people to arm themselves with M-16 assault rifles (REUTERS/Fred Greaves)

According to an affidavit seen by Sky News, he was recorded saying in a telephone conversation: “We will burn down their buildings (and) if anyone attempts to, uh, harm us in any way, our stand gunner will take them down from 350 yards away. The standoff gunner would be me.

"We're gonna be carrying an M4 with 500 rounds of ammunition, light armour piercing, a pistol with three extra magazines, and a machete.

"And if it gets down to the machete, we will cut them to shreds.”

As the “standoff gunner”, Doggart would have shot the residents of Islamberg, his lawyers wrote in the plea agreement.

The village, in Delaware County, is a predominantly Muslim religious community and has been the target of persistent claims from right-wing groups about alleged jihadist terrorist camps.

Islamberg is around 140 miles away from New York City (Afton Almaraz/Getty Images)

Earlier this year, the local police department said it was “perplexed” by the allegations and had seen no evidence supporting them on several visits.

Muhammad Matthew Gardner, a spokesperson for the Muslims of America group based in Islamberg, told Sky News: "Doggart is an example of the results of unchecked and rampant Islamophobia which has spread lies for years about our peaceful community.

"All would agree, if a Muslim did this, the perpetrator would be immediately identified as a terrorist then prosecuted to the fullest extent of the law."