A man accused of plotting to to attack a New York mosque will escape terrorism charges - allegedly because federal laws focus almost entirely on foreign extremists.

Robert Doggart was arrested in April 2015 after authorities discovered that he had been trying to recruit people to burn down a mosque in “Islamberg,” a self-named, predominantly Muslim community near Hancock, according to court records.

The New York Daily News said Mr Doggart, who ran for Congress as an Independent in 2014, allegedly went on right-wing online forums and openly talked about using AR-15 assault rifles to attack Muslims because he believed the community was an extremist training camp.

New York City bodegas strike to protest Trump's travel ban Show all 27 1 /27 New York City bodegas strike to protest Trump's travel ban New York City bodegas strike to protest Trump's travel ban Ethnic Yemenis and supporters protest against President Donald Trump's executive order temporarily banning immigrants and refugees from seven Muslim-majority countries, including Yemen on February 2, 2017 in the Brooklyn borough of New York City. At least 1,000 Yemeni-owned bodegas and grocery-stores across the city shut down from noon to 8 p.m. today to protest the order. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban Men pray during a protest by ethnic Yemenis and supporters over President Donald Trump's executive order temporarily banning immigrants and refugees from seven Muslim-majority countries, including Yemen on February 2, 2017 in the Brooklyn borough of New York City. At least 1,000 Yemeni-owned bodegas and grocery-stores across the city shut down from noon to 8 p.m. today to protest the order. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban Ethnic Yemenis and supporters protest against President Donald Trump's executive order temporarily banning immigrants and refugees from seven Muslim-majority countries, including Yemen on February 2, 2017 in the Brooklyn borough of New York City. At least 1,000 Yemeni-owned bodegas and grocery-stores across the city shut down from noon to 8 p.m. today to protest the order. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban Men pray during a protest by ethnic Yemenis and supporters over President Donald Trump's executive order temporarily banning immigrants and refugees from seven Muslim-majority countries, including Yemen on February 2, 2017 in the Brooklyn borough of New York City. At least 1,000 Yemeni-owned bodegas and grocery-stores across the city shut down from noon to 8 p.m. today to protest the order. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People gather for evening prayer at a rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally with flags at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally with flags at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally with flags at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally with flags at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally with flags at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban A Yemeni business owner places a sign on the gate of his store February 2, 2017 in the Brooklyn borough of New York City. Across the city, Yemeni owned bodega and grocery-stores will shut down from noon to 8 p.m. to protest President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen. It is expected that over 1000 stores will be closed in protest with workers and owners participating in an afternoon rally in Brooklyn. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban A Yemeni business owner places a sign on the gate of his store February 2, 2017 in the Brooklyn borough of New York City. Across the city, Yemeni owned bodega and grocery-stores will shut down from noon to 8 p.m. to protest President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen. It is expected that over 1000 stores will be closed in protest with workers and owners participating in an afternoon rally in Brooklyn. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban NEW YORK, NY - FEBRUARY 02: Yemeni business owner Musa closes the gate to his store February 2, 2017 in the Brooklyn borough of New York City. Across the city, Yemeni owned bodega and grocery-stores will shut down from noon to 8 p.m. to protest President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen. It is expected that over 1000 stores will be closed in protest with workers and owners participating in an afternoon rally in Brooklyn. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban A Yemeni business owner closes the gate to his store February 2, 2017 in the Brooklyn borough of New York City. Across the city, Yemeni owned bodega and grocery-stores will shut down from noon to 8 p.m. to protest President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen. It is expected that over 1000 stores will be closed in protest with workers and owners participating in an afternoon rally in Brooklyn. Spencer Platt/Getty

But the authorities intercepted Mr Doggart’s alleged plot before anyone was hurt.

Now, the 65-year-old is facing one count of solicitation to commit arson, one count of solicitation to commit a civil rights violation and two counts of threat in interstate commerce. However, he is not facing any terrorism charges and has been under house arrest since his initial capture.

Lawyers representing the Islamberg community, claim a loophole in federal law allows defendants such as Doggart to escape terrorism charges.

Woman pleads guilty to assault after telling Muslim girl 'You don't have the right to f***ing be here'

"There's a gap in the law,” lawyer Tahirah Amatul-Wadud told the newspaper.

“Frankly, there is nothing on terrorism unless it's connected to a foreign element. You won’t see the KKK charged with domestic terror even though that's what they do.”

According to the Patriot Act, which was passed in October 2001 in the aftermath of the 9/11 attacks, prosecutors can only charge a defendant with domestic terrorism if he or she had the intension to “intimidate” or “coerce” a civilian population, or influence the “policy of a government” to affect the conduct of government by “mass destruction, assassination, or kidnapping.”

However, Ms matul-Wadud claimed, the requirements are less stringent for pursuing terrorism charges if the alleged act has a foreign element to it, for example ties to international terror networks such as Isis or Al-Qaeda.

Mr Doggart was accused of plotting to burn down a mosque in Islamberg, a predominantly Muslim community in upstate New York.