Two men were sentenced to between four and 12 years in prison on Friday after threatening to bomb a Muslim community in the United States.

Defendants Brian Colaneri, 20, and Andrew Crysel, 19, had both entered guilty pleas. Monroe County Court Judge Samuel Valleriani told the pair: "Your terrorist threat was not only an invidious threat to the way of life of your victims, but also a threat to everyone in our democratic society."

Both defendants expressed remorse, including for conversations they conducted between themselves via an online chat room as part of the plot. The two men had previously pleaded guilty to terrorism conspiracy in June.

"I never wanted it to go that far," Colaneri said, according to local media outlet WHEC.

They and two others from the Rochester area were accused of planning to attack Islamberg, a rural religious community in the area of Tompkins, 150 miles (240 kilometers) to the north of New York City. Authorities arrested the individuals in January and said they had access to 23 rifles and shotguns, as well as three homemade explosives.

Read more: US charities fund fringe anti-Islam network

Concerned citizens alerted authorities

The individuals were exposed after other members of the community raised suspicions regarding their behavior, in addition to their online conversations.

"This horrible incident shows the importance of coming forward if you believe there is any chance of violence against another," Assistant District Attorney Matthew Schwartz said. "Thank you to the members of the community who voiced their concerns and the Greece Police Department for investigating the matter."

Prosecutors said that for several months towards the end of 2018, the accused made plans to acquire weapons and discussed strategies and methods for an attack, and were exposed after a student reported a suspicious comment in a lunchroom. They planned to carry out the attacks in the small Muslim-majority community.

Monroe County District Attorney Sandra Doorley said: "These defendants targeted the inhabitants of Islamberg solely because of their religious beliefs and will have years in the New York State Department of Corrections to reflect on the severity of their actions."

Read more: Terrorism does not discriminate

Watch video 02:23 Share Mosque shooting toll rises to 50 Send Facebook google+ Whatsapp Tumblr linkedin stumble Digg reddit Newsvine Permalink https://p.dw.com/p/3FCcU Christchurch: Outpouring of support for Muslim community

Islamberg resident Tahirah Clark, the community's general counsel, said the plot has altered the lives of many of the inhabitants.

"Our children are afraid but yet resilient and strong and attempting to make the best of our new normal," she said, according to the Democrat & Chronicle, which reported that more than a dozen members of the local community attended the sentencing.

A third defendant in the case, Vincent Vetromile, 20, is expected to receive a similar sentence on August 29 after pleading guilty to weapons possession.

A 16-year-old from Rochester pleaded guilty in a youth criminal court last month to possession of a weapon as a crime of terrorism. He is expected to be sentenced to seven years in prison, of which the first two will be in a juvenile detention center.

Each evening at 1830 UTC, DW's editors send out a selection of the day's hard news and quality feature journalism. You can sign up to receive it directly here.