Updated

An Iraqi refugee who is facing charges he tried to help the Islamic State group wanted to set off bombs at two Houston malls and was learning to make electronic transmitters that could be used to detonate explosive devices, a federal agent testified Wednesday.

Omar Faraj Saeed Al Hardan, who came to Houston from Iraq in 2009, was indicted last week on three charges, including attempting to provide support to a designated terrorist organization. He pleaded not guilty to all three charges during a court appearance on Wednesday.

U.S. District Judge Lynn Hughes denied granting Al Hardan a bond, ruling that there would be a serious risk that the Iraqi refugee would flee if released from federal custody.

Hughes made his decision after listening to testimony from Homeland Security Special Agent Herman Wittliff, who said that in addition to Al Hardan wanting to set off bombs at the two Houston malls, including the popular Galleria mall, the Iraqi man was also learning how to make electronic transmitters that could be used to detonate improvised explosive devices. Al Hardan wanted use cellphones — a collection of which were found in his apartment — to detonate the transmitters, Wittliff said.

"He wanted to build them (the transmitters) for ISIL," Wittliff said.

"For what purpose?" asked prosecutor Ralph Imperato.

"So he could kill people," Wittliff replied.

Al Hardan's arrest prompted criticism of the Obama administration's refugee policies from Texas Gov. Greg Abbott, who has been a leader among Republican governors calling for a halt to resettlement of Syrian refugees in their states. Republican presidential candidate Sen. Ted Cruz of Texas called for a retroactive review of all refugees who have come to the U.S.

Immigrant advocates say they have full confidence in the vetting process and that tens of thousands of Iraqi refugees have been successfully resettled in the U.S.

Al Hardan's older brother, Saeed Faraj Saeed Al Hardan, has said his sibling has denied any wrongdoing and that neither his brother nor anybody in their family had ever expressed any support for the Islamic State.

Prosecutors allege Al Hardan was coordinating efforts with another Iraqi refugee living in California, Aws Mohammed Younis Al-Jayab. The two men communicated through Facebook messenger from April 2013 to October 2014 and talked about getting weapons training and eventually sneaking into Syria to fight alongside the terrorist group, Wittliff said.

The agent also testified Al Hardan received training on how to use an AK-47 assault rifle in November 2014 on a farm outside Houston from a confidential informant who was working with federal authorities.

During the hearing, Wittliff read aloud excerpts from a conversation that authorities had recorded between Al Hardan and his wife in October 2014. Prosecutors did not say how the recording was obtained.

"Once I get the passport I will leave America, I will leave. I will make a widow of you," Al Hardan said to his wife, according to the excerpt read in court. "I will go to Syria. I am not wacko. I am not wacko. I am speaking the truth. I want to blow myself up. I want to blow myself up ... I am against America."

Wittliff also testified authorities had a photograph showing Al Hardan had taken an oath on a Quran to the Islamic State and that in the closet of his bedroom, agents found an Islamic State flag and a prayer to do list in which he spoke about receiving strength to be able to commit jihad and becoming a martyr.

Wittliff was the only prosecution witness at Wednesday's hearing.

Defense attorney David Adler didn't present any witnesses but suggested during questioning of Wittliff that there was nothing illegal about Al Hardan having the electronic components or old cellphones that FBI agents found in his apartment.

Adler also suggested that the firearms training Al Hardan allegedly received from the informant was about "two guys shooting a gun."

The defense attorney said the conversation that authorities recorded between Al Hardan and his wife could have been a domestic argument and that while Al Hardan said he was against America, he didn't say "I'm going to bomb America."

If convicted, Al Hardan faces up to 25 years in prison.

Al Hardan, who is a legal permanent resident, is married, has an 8-month-old son and had worked as a limousine driver before his arrest, according to his brother. Adler said since Al Hardan's arrest, his family has been evicted from their apartment.

Al-Jayab remains jailed in Sacramento, California. Authorities say Al-Jayab fought twice in Syria, including with a group later affiliated with the Islamic State between November 2013 and January 2014.