The families of four Minnesota men charged with trying to join the Islamic State have accused the FBI of paying an informant to set them up. The suspects, all of Somali descent, were detained after months of being monitored by the government agency through one of their former allies. On Thursday, there were audible gasps in the court room as a government official revealed the informant, who once planned to travel to Syria himself, has been paid at least $13,000 for providing tip-offs. The suspects' families screamed from the packed public gallery as their lawyers questioned the reliability of the mole. However, U.S. Magistrate Judge Becky Thorson maintained there was probable cause to believe a crime was committed, and ordered the four men to remain in custody while the case proceeds. 'They came here for peace': Halima Yusuf, a friend of the family of one of the suspects Hanad Mustafe Musse,  cries for the boys outside the United States Courthouse in St Paul, Minnesota . Charged: Hanad Mustafe Musse, 19, (left) and Adnan Abdihamid Farah, 19, (right) are among six Minnesota men of Somali descent that have been charged with traveling or attempting to travel to Syria to join ISIS . Families of the boys, including 19-year-old Zacharia Yusuf Abdurahman (pictured) claim they came to the country for peace and they were set up by their former friend, insisting he devised much of the alleged plot . They are among six men of Somali descent who were charged over the weekend with conspiracy to support a foreign terrorist organization and with attempting to support a foreign terrorist organization. Authorities allege some of the men made repeated attempts to get to Syria, and had developed a plot to get fake passports and travel overseas through Mexico. Slamming the allegations, local imam Hassan Mohamud told CBS: 'The majority of the community was expecting those young people would be released because they did not show any threat to the public safety while they were here.' Weeping, the grandmother of two of the suspects - who are brothers - told the station: 'We ran away from Somalia's problems. We come here and again we get a problem. We need peace.' According to an FBI affidavit, the government's months-long investigation was aided by recordings made by a man who once planned to travel to Syria himself, but then decided to cooperate. More than 200 people tried to get into the court room for Thursday's hearing which escalated into shouts . Emotional: Mohamed Jama, 19, (left) and Abdirahman Shiekh, 19, (right) - both friends of the suspects - wept outside court after hearing that the boys would all remain on jail suspected of trying to join the Islamic State . More than 200 people tried to get into the court room for Thursday's hearing, which was for Guled Omar, 20; Adnan Abdihamid Farah, 19; Zacharia Yusuf Abdurahman, 19; and Hanad Mustafe Musse, 19. Two other men, Mohamed Abdihamid Farah, 21, and Abdurahman Daud, 21, faced hearings in San Diego, where they were arrested. Daud's mother, Farhiyo Mohamed, told the Wall Street Journal: 'My son is a good kid.' She explains they moved over to the U.S. from Somalia in 2003, adding: 'We came to this country for peace.' In ordering the four men detained, Thorson said she was looking at the weight of the evidence and other factors. Her ruling prompted one community member in the courtroom to shout: 'You cannot weight anything but evidence, ma'am. We are the community! You should ask us!' He was led from the courtroom. The hearing was tense for Somali community members. Afterward, Imam Hassan Mohamud said the community is angry, and some blame the informant. He criticized a Department of Justice pilot program designed to stop recruiting for terror groups before it starts, saying it will cause division. 'Some members of the community are looking @ other members of the community (as) spying to each other and sending them, their kids, to jail,' Mohamud said. 'That's why they are all angry. These four, all of them, are innocent until proven guilty.' The U.S. attorney's office said the pilot program is an outreach effort that 'is and always has been completely separate from the investigative and prosecutorial responsibilities of this office.' Members of Minnesota's Somali community cover their faces as they arrive at the St Paul court on Thursday . Tensions were high among the community in the court as defense attorneys also questioned how the FBI could take the informant's word when he previously lied about his own involvement . In court, defense attorneys questioned FBI Special Agent Harry Samit about the government's payments to the informant. Musse's attorney, Andy Birrell, asked whether his compensation was related to the number of people charged. Defense attorneys also questioned how the FBI could take the informant's word when he previously lied about his own involvement. They also asked why only some of his conversations were recorded, and whether it was the informant's idea to pursue fake passports to get to Syria. Samit testified the informant was paid nearly $13,000 for expenses and 'services' and the amount wasn't related to the number of people charged. Samit said the informant was being asked to gather evidence against people involved in 'the most violent terrorist group in the world.' 'He's exposing himself to a certain element of danger,' Samit said. Samit also said the investigation was broader than just the informant's evidence, and agents verified some details through their own surveillance. As for why not all conversations were recorded, Samit said some early conversations happened before the informant was given recording equipment. He also said some conversations weren't recorded because of equipment failure or poor sound quality. The fake passports were initially Abdurahman's idea, Samit testified, but when that fell through, the FBI suggested the informant come up with his own way to get fake passports. Support: Hordes of people flocked through the doors including friends, families and local imams . High security: Agents were seen patrolling the area with sniffer dogs during the controversial proceedings . When Assistant U.S. Attorney John Docherty asked Samit how the defendants responded to that idea, Samit said: 'Very enthusiastically.' Monday's announcement of charges threw Minnesota's Somali community, the largest in the U.S., into familiar turmoil. Since 2007, more than 22 young Somali men have traveled from Minnesota to Somalia to join the militant group al-Shabab. Authorities have also said a handful of Minnesota residents have traveled to Syria to fight with militants in the past year. About 200 people from the Somali community packed the courtroom Thursday, plus an overflow room and spilled into the hallway. As the hearing began, Docherty told the court that several attempts had been made to contact the informant or members of his family, and there had been 'ugly behavior' on social media. Docherty warned that such activities could lead to prosecution. Omar Jamal, a longtime activist, said the community has a hard time accepting that a Somali informant was involved, but he said local Somalis shouldn't create an adversarial situation. He said it was good the government stopped young men from potentially joining a terrorist group, then added: 'but that doesn't mean we can't ask the government questions.' Samit testified that the informant has been relocated at FBI expense, but isn't in custody or under constant watch. He also said the government has made no promises that the informant would not be prosecuted in the future.
FBI revealed it has paid $13,000 to a man who once tried to flee to Syria but was caught and agreed to cooperate .
He has been protected from charges, six of his former allies are charged .
Families screamed as lawyers questioned the mole's reliability .
Judge overruled the appeals, ordered for 4 Minnesota men to stay in jail .
The other two suspects were arrested in San Diego, remain in custody .