Updated

Two New Jersey men have pleaded guilty to charges that they tried to join an Al Qaeda-affiliated group overseas.

Mohamed Mahmood Alessa and Carlos Eduardo Almonte entered into a packaged plea deal in a Newark federal courtroom Thursday.

They admitted to conspiring to kill, maim and kidnap persons outside the United States by trying to join al-Shabab, a designated terrorist organization.

The 21-year-old Alessa, of North Bergen, was born in the United States and is the son of Palestinian immigrants. Almonte, 24, of Elmwood Park, is a naturalized citizen who was born in the Dominican Republic. Both are Muslim.

The charges could carry up to life in prison, but they may face 15 to 30 years at their June sentencing under the terms of the plea agreement.

"Through covert recordings and their admissions today, Alessa's and Almonte's own words confirm they took steps down a deadly path," U.S. Attorney Paul Fishman said in a statement Thursday. "The defendants planned and trained for a mission that began in their New Jersey neighborhoods and would end with the murder of innocent civilians."

The New Jersey case is one of the first to tie both Anwar al-Awlaki, an American cleric and Al Qaeda operative in Yemen, and Omar Hammami, an American-born member of al-Shabab, to a single plot. Prosecutors allege that Alessa and Almonte were inspired while listening to videos from both Awlaki and al-Shabab.

The case is also another example of a new generation of digital jihadists, who take their inspiration from the web and do not have direct personal contact with clerics like Awlaki.

Fox News' Catherine Herridge contributed to this report.