The 16-year-old high school student from suburban Rochester pleaded guilty in youth criminal court Thursday to criminal possession of a weapon as a crime of terrorism.
He will be sentenced to seven years in state prison, serving the first two years in juvenile detention.
The teen and three men were accused in January of planning to attack the community of Islamberg, near Binghamton.
Police say they had access to 23 rifles and shotguns and three homemade explosives.
Vincent Vetromile pleaded guilty to a weapons charge and faces seven to 12 years in prison. Brian Colaneri and Andrew Crysel pleaded guilty to terrorism-related conspiracy and face four to 12 years in prison.
Investigators uncovered the plot after a student reported a suspicious comment in a lunchroom.
Islamberg is a rural community of about 200 residents. Police and community members have dismissed accusations that the Muslims of America enclave is a terrorist training ground.
In 2017, a Tennessee man was convicted of federal charges for what authorities called plans to burn down Islamberg's mosque.