Vincent Vetromile, Brian Colaneri, Andrew Crysel three of the four suspects.

Police in New York state on Wednesday identified three young men arrested for allegedly planning a "potentially lethal" attack on a Muslim community regularly targeted by US extremist sites.

Brian Colaneri, 20, Andrew Crysel, 18 and Vincent Vetromile, 19 were arrested after police in Greece, New York recovered three explosive devices and 23 weapons from the suspects' homes, according to spokesman Jared Rene.

A fourth unidentified suspect, aged 16, was also detained. The group were accused of planning the against a community called Islamberg several hours drive from Greece, Rene said.

The community of some 200 people is managed by the organization Muslims of America, which thanked authorities for preventing a "possible massacre of our community."

Rene said police were tipped off by a high school student who overheard other students speaking of a "next school shooter."

When authorities searched homes they found weapons legally obtained by parents, but uncovered the attack plot.

"The kids did the right thing. When they saw something, they said something. It was a collaborative effort, we uncovered what was probably going to be a deadly attack," he said.

Charged with possession of explosives, the three young men are expected to appear in court February 5.

Rene added they could still face federal charges, including terrorism.

Another plot to attack Islamberg was foiled in 2015, with its author, Robert Doggart, sentenced to 20 years in prison in 2017.