SACRAMENTO, Calif. — An Iraqi man bragged about his experience fighting in Syria and the skills he developed as a teenage insurgent as he urged a fellow Iraqi refugee in the United States to join him in what both hoped would be martyrdom, according to documents filed in federal court.

Aws Mohammed Younis Al-Jayab, 23, of Sacramento described his experience fighting against Syrian government soldiers in heroic terms and promised in 2013 he would train Omar Faraj Saeed Al Hardan of Houston in how to use weapons and sneak into Syria to join the fight, according to an FBI affidavit unsealed in federal court in Sacramento.

The two Iraqi-born Palestinians used social media to discuss their plans, according to federal authorities. The communications provided the link that led to terrorism-related charges against the men this week.

Al-Jayab faces up to eight years in prison on charges of traveling to Syria to fight in late 2013 and early 2014 and lying to U.S. authorities about his travels. Al Hardan faces up to 25 years in prison and is charged with attempting to provide material support for terrorists.

Sen. Ted Cruz of Texas called immediately for a retroactive review of all refugees who have come to the United States.

"How many ticking time bombs are we going to bring in in this refugee program without a proper vetting system in place?" Rep. Michael McCaul, R-Texas and chairman of House Homeland Security Committee, said at a news conference.

He and other GOP lawmakers urged the Senate to pass legislation to block refugees from Iraq and Syria until screening is improved. The House passed a bill in November.

The uproar comes after weeks of fervent debate in Washington and on the presidential campaign trail about tighter security screens in the wake of attacks in Paris and San Bernardino, Calif.

Al-Jayab's attorney on Friday criticized U.S. politicians who he said "have grossly mischaracterized the nature and scope of this case" to tie it to the debate over whether the United States is doing enough to screen refugees.

"There is no threat that this man poses or no indication that he's engaged in any activity since his return two years ago. The only activities that were interrupted were his studies and his work," defense attorney Ben Galloway said outside the courtroom.

U.S. Magistrate Judge Carolyn Delaney ordered him held without bail.

It's not clear how Al-Jayab and Al Hardan met online, although the FBI affidavit describes at least one apparently mutual acquaintance.

The criminal complaint against Al-Jayab recounts a series of communications with different people, none of whom is identified. One called "Individual I" is Al Hardan, according to Lauren Horwood, a spokeswoman for the U.S. attorney in Sacramento.

Federal authorities say Al-Jayab emigrated from Syria to the United States as a refugee in October 2012, living in Tucson, Ariz., and Milwaukee until November 2013, when he went back overseas to fight.

He returned to the United States in January 2014 and lived in Sacramento. He has been a computer science major at a Sacramento community college since last fall.

Al-Jayab and Al Hardan communicated in April 2013, and Al Hardan expressed interested in fighting in Syria.

"O God, grant us martyrdom for your sake while engaged in fighting and not retreating; a martyrdom that would make you satisfied with us," Al-Jayab wrote to Al Hardan, according to court documents.

Al-Jayab said he had already fought in Syria, starting when he turned 16, according to messages between the two men quoted in court documents. He promised to provide weapons training to Al Hardan and advised him on how he would be assigned to the battlefield once he arrived in Syria.

Authorities say Al-Jayab fought twice in Syria, including with a group later affiliated with the Islamic State between November 2013 and January 2014. He told authorities he had traveled to Turkey to visit his grandmother, which prosecutors say was a lie that could send him to prison.

Court documents rely heavily on Al-Jayab's social media communication, much of which is in Arabic, travel records and Internet IP addresses. Prosecutors did not provide additional information.

In several messages, Al-Jayab criticized Islamic State for killing Muslims, although he later described fighting alongside the group.

"If it weren't for the State's bloodletting, I would have been the first one to join it," he said, according to the FBI.

Al Hardan, 24, appeared in a Houston federal court Friday. Prosecutors charged him with attempting to support the Islamic State and accused him of providing resources to the group beginning around May 2014. Court documents did not provide specifics about the allegations.

Federal officials say two of Al-Jayab's brothers in Milwaukee and a cousin in California also were arrested but those arrests are not related to national security.