(CNN) -- The two New Jersey men suspected of attempting to fly to Somalia to join a terrorist organization were denied bail at a court hearing on Thursday. Mohamed Mahmood Alessa, 20, of North Bergen, New Jersey, and Carlos Eduardo Almonte, 24, of Elmwood Park, New Jersey, are 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. The men, who were taken into custody at John F. Kennedy International Airport on Saturday, intended to take separate flights to Egypt on their way to Somalia "to join designated foreign terrorist organization Al-Shabaab and wage violent jihad," according to federal prosecutors.
@highlight
Bail denied for two men accused of trying to join a terror group
@highlight
The two were arrested at an airport on June 5
@highlight
The FBI was investigating the two suspects since 2006
The U.S. attorney's office in @placeholder said the investigation of the two men began with a tip to the FBI -- from someone who knew them -- in October 2006.