Newark, New Jersey (CNN) -- Two New Jersey men who were arrested after allegedly trying to travel to Somalia to fight with an al Qaeda-affiliated group pleaded guilty in court Thursday.
Mohamed Mahmood Alessa and Carlos Eduardo Almonte have been charged with one count each of conspiracy to kill, maim and murder persons outside of the United States, which carries a maximum sentence of life in prison.
Both men appeared in court handcuffed and wearing orange prison garb and entered their pleas to U.S. District Court Judge Dickinson Debevoise.
"Through covert recordings and their admissions today, Alessa's and Almonte's own words confirm they took steps down a deadly path," said U.S. Attorney Paul J. Fishman. "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 pair had allegedly tried to join al-Shabaab, a group the U.S. identifies as a terrorist organization.
"It's a difficult day," said Alessa's attorney, Stanley Cohen. "This activity began when my client was 16" years old.
"Kids say and do things they don't necessarily mean," he added.
The two were taken into custody at John F. Kennedy International Airport on June 5, and intended to take separate flights to Egypt on their way to Somalia "to wage violent jihad," according to federal prosecutors.
The criminal complaint filed in U.S. District Court in Newark alleges that in 2007, Alessa and Almonte traveled together to Jordan, where they intended to enter Iraq to commit violence against U.S. troops there.
Alessa's mother, Nadia, told CNN in June that her U.S.-born son went to 16 or 17 psychiatrists for what she called "anger management issues" that surfaced when he was a boy. He lived at his parents home, where his angry outbursts were common.
However, she said, he wasn't particularly religious. "He slept late. If he was devout, he would make his prayers on time. He didn't," she said.
She helped him pack for his trip to Egypt, though she said she resisted the idea from the start. Nadia Alessa said she was reassured by a man named "Bassim," who had befriended her son and Almonte.
"He said we're going to study Arabic. I said but here there are many schools. But he say in Egypt, they're better," she recalled being told by the man, when she expressed concerns about Alessa moving to Egypt.