Katrina Leung, a US citizen accused of being a Chinese double agent, has had her bail set at $2m by a US federal court.
Mrs Leung's lawyer says she is a victim, not a double agent
Mrs Leung is accused of possessing secret documents and copying them in order to use them to help a foreign nation.
She is alleged to have been working as an FBI agent while at the same time passing information to the Chinese.
Federal prosecutors opposed Mrs Leung's release, arguing that her access to large sums of money and contacts in China meant she could try to escape.
However, US District Judge Florence Marie-Cooper agreed to place her on an electronic monitor and said she cannot leave the local county, Reuters news agency reported.
Mrs Leung's lawyers said in a statement that Mrs Leung had no intention of fleeing to China because of the risks she faced there.
"If she were somehow to be admitted to [China] she would likely never see her family again, because she would undoubtedly be
imprisoned under the cruellest of conditions and could even
be put to death," they said.
She had been held without bond since her arrest on 9 April.
'No Mata Hari'
Mrs Leung's alleged former lover and FBI handler, retired Federal Bureau of Investigation agent James Smith, has already been released on $250,000 bail.
He is charged with fraud and gross negligence.
The two are both due back in court on 1 July, where they will be tried separately. Both have pleaded not guilty to all charges.
Neither is being tried for espionage, a more serious crime.
Mrs Leung's lawyer, Janet Levine, said after her arrest that her client was a loyal American who was being offered up as a "sacrificial lamb" by the FBI to cover its own failings.
Ms Levine said the FBI had risked her client's life by continuing to employ her as an agent after her cover was blown.
"People need to know that this is no Chinese Mata Hari," she said.
"This is an insulting and degrading sexist and racist slur planted and used by people who should be ashamed of themselves."
Mr Smith is said to have recruited Mrs Leung in 1982 to be an FBI agent providing intelligence on China, and the two reportedly began an affair that year.
Mrs Leung, 49-years-old and a prominent Los Angeles socialite and fundraiser for the Republican Party, was considered a highly valuable source by the FBI and was paid $1.7m for her information over the years, court documents say.
But it is alleged that Mrs Leung was simultaneously passing information to the Chinese.
Prosecutors say she removed classified material from Mr Smith's briefcase when he visited her home, and passed the information to Chinese intelligence agents.
Mrs Leung faces up to 50 years in prison if convicted on all
counts, while Mr Smith faces up to 40 years behind bars.
Mr Smith spent 30 years in the FBI, most of that time as a Chinese counter-intelligence agent, before retiring three years ago.