U.S. prosecutors are worried that a former Twitter Inc. employee charged with helping Saudi Arabia spy on dissidents will be “whisked away” by the Royal Kingdom just like his co-defendant who had also worked for the platform.

The concerns were heightened Thursday as a federal judge in San Francisco rejected prosecutors’ request to keep Ahmad Abouammo in custody, releasing him on $50,000 bail. The ruling capped a dramatic two weeks of lawyers sparring in front of multiple judges over how to treat a 41-year-old social media marketing professional with no criminal history who is now accused of acting as an illegal foreign agent in the U.S. and could face a long prison term if convicted.

Assistant U.S. Attorney Colin Sampson warned that four years earlier, when Twitter confronted engineer Ali Alzabarah about improperly accessing user data, he “made one phone call” to contact the government in Riyadh and was on a flight to Saudi Arabia the next day. If released from custody, Abouammo could so the same, Sampson said.

“His contacts are extremely powerful,” Sampson told U.S. District Judge Edward Chen. Saudi Arabia would send an important signal of support to its “spies and moles” and avoid the embarrassment of a criminal trial by helping Abouammo escape U.S. custody, he said. “We’re talking about state powers.”

Abouammo’s lawyer countered that he never attempted to flee, even after his former colleague did, and that he cooperated with the FBI when the agency interviewed him and later searched his home.

“He did the complete opposite” of Alzabarah “knowing full well that he was going to be indicted,” said Jodi Linker, a deputy public defender. “He went nowhere.”

Sampson didn’t back down, even in the face of Chen’s skepticism after the judge said he’d require Abouamma and his wife to surrender their passports.

“The government of Saudi Arabia would not have a problem issuing new passports, potentially in new names,” the prosecutor said.

Abouammo and Alzabarah were allegedly recruited by a third defendant, Ahmed Almutairi to use their Twitter credentials to gain access to the accounts of “users of interest” to the Saudi royal family, according to a criminal complaint unsealed on Wednesday.

Abouamma, arrested Nov. 6 at his home in Seattle, looked ragged and disheveled in court Thursday. Chen was the fourth federal judge he’d seen in two weeks, all of them agreeing he should be released. Procedural problems required repeated courtroom appearances, each time with his wife and three small children following the hearings and attempting to communicate through glances and gestures.

Acknowledging the seriousness of the charges, Chen nonetheless drew sharp distinctions between Abouammo, a citizen of the U.S. and Lebanon, and Alzabarah, a Saudi national. The judge said Abouammo has lived in the U.S. for 20 years, and was unmoved by arguments that losing his Seattle home to foreclosure and filing for bankruptcy made him more likely to flee.

“There’s a tie here,” Chen said. “Normally, there’s a lower chance of flight when one has a family.” Surrendering his passport “moves the needle,” the judge said. Chen also required Abouammo’s wife, sister and an uncle, all in the U.S., to sign on as sureties to back his bail bond.

The case is U.S. v. Abouammo, 19-cr-621, U.S. District Court, Northern District of California (San Francisco).