MINNEAPOLIS (AP) — Three Minnesota men accused of trying to go to Syria to join the Islamic State group will remain in custody for now.

But U.S. District Judge Michael Davis also said at hearings Wednesday he'll carefully consider plans drafted by their defense attorneys and the Somali community that could facilitate a release to a halfway house and reintegration into the community.

Davis invited Somali community members and religious leaders to come up with plans including counseling and other activities that would steer them in a positive direction while protecting public safety and ensuring their court appearances.

The men are among a group of seven Minnesotans facing charges of conspiracy to provide material support to a terrorist group.

The government opposes their release, saying the men are a danger and flight risk.