1 of 7
Jim Mone, Associated Press
Members of Minnesota's Somali community cover their faces as they arrive Thursday, April 23, 2015, for a detention hearing in federal court in St. Paul, Minn. for four of the six Minnesotans who are accused of plotting to travel to Syria to join the Islamic State group. Prosecutors have said they plan to ask a judge to keep the men in custody pending trial, saying they are a flight risk.

ST. PAUL, Minn. — A federal judge has ordered that four Minnesota men accused of trying to travel to Syria to join the Islamic State remain in custody while their case is pending.

Magistrate Judge Becky Thorson made her ruling after several hours of testimony Thursday.

The men are among six charged in a criminal complaint unsealed Monday.

Thorson's ruling caused an outburst in a courtroom packed with more than 100 people, many from Minnesota's large Somali community. One man was led out of the courtroom after he admonished the judge.

All six of the men charged are Somali-American. Minnesota has struggled for years to stem recruiting by militants, first from al-Shabab in Somalia and more recently the Islamic State in Syria.