A Jersey Shore man charged last year with attempting to aid the terrorist group ISIS pleaded guilty to the crime in federal court in Trenton Tuesday morning.

Gregory Lepsky, 21, of Point Pleasant Borough, pleaded guilty to one count of attempting to provide material support to a designated foreign terrorist organization before U.S. District Judge Michael Shipp, in Trenton.

A plea deal with prosecutors calls for him to spend 16 to 19 years in prison. He could have faced 20, officials said.

Lepsky only answered basic yes and no questions during his court appearance.

According to Assistant United States Attorney James Donnelly, a search of Lepsky's computer and other electronics uncovered his plan to build and detonate a bomb as part of his support for ISIS.

Read more: NJ.com