The attorney for one of seven men charged with supporting terrorism accused the government Friday of "waving the bloody flag of terrorism" during a hearing to determine whether his client could be released before trial.

The hearing featured the most contentious and politicized arguments yet since a group of Twin Cities men were charged with plotting to leave the country to fight with the terror group ISIL in Syria. At issue was whether Abdirahman Yasin Daud, 21, should be released before he stands trial.

After an hour of impassioned arguments from the defense and prosecutors, Chief U.S. District Judge Michael Davis ordered Daud to remain in custody while he examines a pretrial report on Daud's background.

Daud and his friend, Mohamed Farah, were arrested in mid-April in San Diego by the FBI after traveling there from Minneapolis. FBI agents say the pair sought to cross into Mexico and then fly to Turkey on their way to Syria. Farah threatened to kill FBI agents if he was stopped, according to recordings by a confidential informant who accompanied the pair to California.

The portrayal by Daud's defense attorney of a quiet and respectful young man clashed with prosecutors' depiction of him as harboring ambitions to become a martyr for ISIL, the Islamic State of Iraq and the Levant.

"This evokes a very clear image of a man who is very persistent and certainly presents a danger here and abroad, as well as a risk of flight," said Assistant U.S. Attorney Andrew Winter. He cited a litany of ISIL atrocities, saying, "We don't need to recount the number of public beheadings that have played out in the media.

"The defendant himself sought to become a shahid, a martyr," Winter said. "A martyr is not created absent carnage, absent suicide vests."

Daud's attorney, Bruce Nestor, countered that anyone — particularly a young person — can be susceptible to political influences. He countered that Daud lacked the resources of a would-be terrorist, such as a passport, money and family ties abroad. The charges against Daud, he said, are indicative of "government desperation."

"The government came out here waving the bloody flag of terrorism," he said, mentioning atrocities and beheadings by U.S. allies. "What about the 5,000 Americans who died in Iraq under false pretenses?"

Daud's family was among dozens of members of the Twin Cities Somali community who filled the courtroom under close watch by U.S. marshals and the Department of Homeland Security. Rick Thornton, special agent in charge of the FBI Minneapolis Division, sat in the front row for the arguments, which took place a day after the release of allegations that threats were made against FBI agents.

Jean Emmons, a youth program manager for Eastside Neighborhood Services, smiled from the witness stand as she recalled Daud's calm demeanor. Emmons worked with him from 2009 to 2013, recalling him mentoring younger students, calming scuffles during basketball games and walking away from conflicts. His family members, she said, were devout Muslims, but didn't have extreme views. They were dedicated to his progress in the Minneapolis Public Schools.

"It's a commitment to being an American," she said when asked of the significance. "It's a commitment to integrate."

At the time he left for San Diego, Daud was living with his 34-year-old stepsister, Farhiyo Mohamed, whom he viewed as his mother. His elderly parents were also in court and stood before the judge as he explained through a translator that he needed to evaluate Daud's background before reaching a decision.

After the hearing, 26-year-old Yonis Daud called his brother a victim of FBI entrapment.

"I believe my younger brother is innocent. He's a peaceful guy," he said. "They set him up. He's not a terrorist."