NEWARK, N.J. - Two New Jersey men accused of trying to join a terrorist group in Somalia intended to commit acts of violence even though their plans appeared haphazard, a federal prosecutor said Monday.

"Sophistication is not a measure of danger," U.S. Attorney Paul Fishman said.

"Their intentions were described pretty clearly," he said. "They were watching certain videos and interested in what certain people were saying and advocating."

Mohamed Mahmood Alessa and Carlos Eduardo Almonte made their first court appearance Monday in Newark.

Alessa, 20, and Almonte, 24, were arrested Saturday night at New York's Kennedy Airport as they prepared to fly to Egypt and then to Somalia, authorities said.

They are charged with conspiring to kill, maim, and kidnap people outside the United States by joining al-Shabab, a group designated by the United States in 2008 as a terrorist organization.

Alessa and Almonte appeared before U.S. Magistrate Judge Madeline Cox Arleo on Monday with their hands and feet shackled. Both had dark curly hair and beards. Alessa had cuts and bruises on his forehead.

They spoke only to affirm that they understood the charge against them. Two of Alessa's family members and court-appointed attorneys for both men declined to comment after the hearing.

Alessa and Almonte will be held without bail pending a detention hearing on Thursday. If convicted, they could face life in prison.

Investigators said the two Muslim men intended to head to Somalia to seek terrorism training from al-Qaeda-affiliated jihadists and attack fellow Americans.

But their preparations apparently were unsophisticated. They lifted weights, bought military-style pants, tried paintball, played violent video games, and watched terrorist videos online, authorities said. The only weapons they possessed were two folding knives.

Fishman would not say Monday whether they had made any actual contacts with al-Shabab. According to officials and court documents, their trip to Somalia amounted to a leap of faith that they would be accepted.

Law enforcement became aware of them in the fall of 2006 when the FBI received an anonymous tip through its website, and some unidentified family members cooperated with investigators, according to a criminal complaint.

Though the two men discussed attacking U.S. troops, the investigation revealed no immediate threats to soldiers, since the United States has no permanent or large military presence in Somalia.

Officials said the two were not planning an imminent attack in the New York-New Jersey area.