SANTA ANA, Calif. 
A federal magistrate on Tuesday set bail at $500,000 for an alleged brother-in-law of Osama bin Laden's bodyguard, and a Muslim advocacy group said it wants a federal investigation into whether he was arrested because he had refused to become an FBI informant.

Ahmadullah Niazi, 34, appeared in U.S. District Court on charges of lying about alleged ties to terrorist groups on his citizenship application. He has not yet entered a plea and will be arraigned next week.

U.S. Magistrate Arthur Nakazato ruled that Niazi must submit to electronic monitoring and home detention and surrender his passport and other travel documents. He cannot leave Southern California.

Niazi is not charged with terrorism, but Assistant U.S. Attorney Deirdre Eliot told Nakazato that searches of his home and computers yielded evidence that he sympathizes with terrorist groups and has ties to men who are globally designated as terrorists.

Niazi is an Afghan native and a naturalized U.S. citizen. Authorities allege his sister, Hafiza, is married to Amin al-Haq, identified in court papers as a high-ranking al-Qaida member. Prosecutors say al-Haq was believed to have been bin Laden's bodyguard around and after Sept. 11, 2001.

Al-Haq also is suspected of working with Younis Khalis, who founded the terrorist organization Hezb-e-Islami, which fights against international and U.S. troops in Afghanistan. Khalis assisted in founding al-Qaida and helped bin Laden leave Sudan in 1996, Eliot said.

"In our eyes, this isn't just an immigration case. In our view, the defendant is involved with the mujahadeen himself," Eliot said. "Frankly, there is no amount of bail or equity in a home that can protect the citizens of this community."

Muslim-American advocates countered that Niazi was charged because he refused to become a government informant after telling the FBI in 2007 about a radicalized new Muslim convert.

The Council on American-Islamic Relations, or CAIR, announced Tuesday it would ask Attorney General Eric Holder to investigate whether Niazi's arrest stemmed from his refusal to help the FBI.

FBI Agent Thomas J. Ropel III testified that the convert Niazi reported was actually an FBI informant who had infiltrated several mosques in Orange County. Niazi was in charge of the convert's spiritual education and taught him Arabic, Ropel said.

Defense attorney Chase Scolnick said the FBI should have been grateful for Niazi's cooperation.

"The federal government should be encouraging and rewarding people who do this," Scolnick said. "This is what happens when someone tries to help the FBI. They bring charges against him."

Court documents show that in 2007, Niazi reported a new Muslim convert who allegedly spoke repeatedly of jihad and suggested planning terrorist attacks.

An FBI agent interviewed Niazi in June 2007 and again in April 2008. Niazi met with Muslim advocates after the second interview and told them the agency had threatened to make his life a "living hell" if he did not become an informant, said Hussam Ayloush, executive director of the Council on American-Islamic Relations.

"He was in tears, crying. He said, `I came to this country to be free, to be a human being and now I'm being asked to be a spy," Ayloush said after the hearing.

Court documents show testimony by Niazi was instrumental in the mosque getting a restraining order against the convert.

Ropel said he believes Niazi reported the convert as a way to protect himself after realizing he might be an FBI informant. Niazi himself had been under surveillance since 2006 and subsequently lied during interviews with the FBI, Ropel said.

Niazi told agents that he and the convert had only discussed jihad once or twice, but secret recordings made by the informant showed the two had talked about it at least 20 times in conversations instigated by Niazi, Ropel said.

Niazi also called bin Laden "an angel" and referred to sending money to the Afghan mujahadeen, Ropel said.

Niazi told the informant it was his "duty to engage in violent jihad" and was preparing to send the informant to terrorist training camps in Yemen or Pakistan, Ropel said.

Ayloush, however, accused the informant of entrapping Niazi by exploiting irregularities on his naturalization and passport applications.

"What we're witnessing today is the hiring of instigators who actually manufacture terrorism cases to allow the FBI to prevent them," Ayloush said. "It's almost like the fireman who's thought up a fire to look like a hero when he stops it."

Niazi is charged with perjury, procurement of naturalization unlawfully, passport fraud and making a false statement. He could face up to 35 years in prison if convicted of all charges.

(This version CORRECTS that magistrate set bail and that CAIR stands for Council on American-Islamic Relations.)