A detained Iranian-American academic accused of conspiring against the government was freed on bail Tuesday from the Tehran prison where she had been jailed since early May, a top judiciary official said.

Haleh Esfandiari, director of the Middle East program at the Woodrow Wilson International Center for Scholars, has been jailed largely incommunicado at Tehran's Evin prison on charges of acting against national security.

Mohammad Shadabi, an official at the Tehran prosecutor's office, told The Associated Press she was freed on $333,000 bail. Shadabi said he could not say whether Esfandiari would be allowed to leave Iran.

Earlier, Esfandiari's husband said her mother used the deed to her Tehran apartment to post bail.

"I feel extremely good. It has been a very anxious several months. Now we hope she will not only be released from prison but allowed to come back home," the husband, Shaul Bakhash, said from his home in Potomac, Md.

Esfandiari was expected to return to her mother's home, Bakhash said.

"I feel extremely good. It has been a very anxious several months. Now we hope she will not only be released from prison but allowed to come back home," Bakhash said from his home in Potomac, Maryland.

Bakhash did not know the terms of her bail.

Esfandiari's troubles in Iran began when three masked men holding knives threatened to kill her on Dec. 30 as she was her way to the Tehran airport after visiting her 93-year-old mother, the Wilson Center said. They took her baggage, including her U.S. and Iranian passports, the center said.

For several weeks, she was interrogated by authorities for up to eight hours a day, according to the center. Most of the questioning focused on the activities of the Middle East Program at the Wilson Center.

Iran confirmed in mid-May that it was detaining Esfandiari and charged her later that month. The only contact her family has had with her since her arrest have been short phone calls to her mother from prison.

Earlier this month, Iranian authorities said they have concluded an investigations into Esfandiari, and Kian Tajbakhsh, another detained Iranian-American also accused of conspiring against the country's security.

At the time, no decision had been made on whether they will be put on trial.

The Evin prison is notorious for its harsh conditions for political prisoners. Esfandiari's husband and the Wilson Center have said she was not permitted to speak to lawyers.

Last month, Iranian public television broadcast video in which Esfandiari said a network of foreign activists was trying to destabilize Iran and bring about "essential" social change. The video also featured Tajbakhsh, an urban planning consultant with the Soros Foundation's Open Society Institute.

Both the Wilson Center and the New York-based Open Society Institute have criticized the Iranian government for the broadcast and dismissed the statements as "coerced."

Two other Iranian-Americans also face security-related charges: Parnaz Azima, a journalist for U.S.-funded Radio Farda, and Ali Shakeri, a founding board member of the Center for Citizen Peacebuilding at the University of California, Irvine. Shakeri is in prison, while Azima is free but barred from leaving Iran.

Family members, colleagues and employers of all the detained have consistently denied the allegations.

Apart from Esfandiari's case, there was no news Tuesday on any developments in those of the other three Iranian-Americans.

The detentions have become another point of contention in the tensions between the U.S. and Iran, joining Washington's accusations that Iran arms Shiite Muslim militants in Iraq, fuels unrest in Lebanon and seeks to develop nuclear weapons. Tehran denies those claims, and blames Washington for Iraq's instability.

The Iranian Intelligence Ministry has accused Esfandiari and her organization of trying to set up networks of Iranians with the ultimate goal of creating a "soft revolution" in Iran, along the lines of the revolutions that ended communist rule in eastern Europe.

The Wilson Center is a nonpartisan institution established by Congress in 1968 and funded through private and public funds, according to its Web site. Its Middle East program focuses on several areas, including "analysis of internal domestic and social developments in Iran; the aspiration of the younger generation for reform and expansion of individual liberties," according to the site.