After months spent in a notorious prison with no access to lawyers, Haleh Esfandiari was released on bail on Tuesday, an Iranian judiciary official said. It remained unclear if the 67-year-old Iranian-American academic, charged with endangering Iranian national security, would be allowed to leave the country. Esfandiari, director of the Middle East program at the Woodrow Wilson International Center for Scholars, had been jailed in Teheran's Evin prison since early May after enduring months of intense interrogations. She was released after her elderly mother used the deed to her Teheran apartment to post the bail, family members said. "She was released about 30 minutes ago after the bail of 3 billion rials (about $333,000) was posted," Mohammad Shadabi, an official at the Teheran prosecutor's office, told The Associated Press, Tuesday evening. Former US Representative Lee Hamilton, head of the Wilson Center, said he was unsure what had prompted the bail release but said he had recently received a written response from Iran's Supreme Leader Ayatollah Ali Khamenei after sending him a letter appealing for Esfandiari's release. "I cannot speak to that (why she was released) with certainty, because I do not know what goes on inside the Iranian government. I think an important factor was my letter to the supreme leader a few weeks ago," Hamilton told reporters by phone. Hamilton also had met with Iran's UN representative, Mohammad Khazaee, who told him Esfandiari's release was imminent. Hamilton, who has not been in direct contact with Esfandiari, said as far as he knew, the charges against her had not been dismissed. He also said he didn't have information about three other Iranian-Americans facing security-related charges in Iran. The Washington-based center said Esfandiari's cousin had gone to pick her up at the prison at 5 p.m. local time (13:30 GMT) but was unsure if she had left the prison because several hours of paperwork needed to be completed first. Officials in Teheran also could not immediately confirm if she left the prison facility and returned to her mother's home. Esfandiari's husband said his wife's 93-year-old mother received a call from an Iranian judiciary official Tuesday morning informing her of the decision to release Esfandiari on bail. Fanny Esfandiari used the deed to her Teheran apartment to post bail, Shaul 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. 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 Teheran airport after visiting her mother, the Wilson Center has said. They took her baggage, including her US and Iranian passports, making her unable to leave the country, 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 then have been short phone calls to her mother from prison. In the calls, Esfandiari indicated she was under immense stress and was having trouble receiving medications for health conditions, Hamilton said. Shadabi, the Iranian prosecution official, said he did not know if Esfandiari would be allowed to leave the country. It also was not known if Esfandiari would be put on trial. 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. Bakhash and the Wilson Center, a nonpartisan institution established by the US Congress in 1968, deny the allegations. Earlier this month, Iranian authorities said they concluded investigations into Esfandiari and Kian Tajbakhsh, another detained Iranian-American accused of conspiring against the country's security who is the Evin prison, infamous for its harsh conditions for political prisoners. 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 US-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 four have consistently denied the allegations. In Washington, State Department spokesman Gonzalo Gallegos could not confirm Esfandiari's release but said that the US maintains the detained Iranian-Americans "had done nothing wrong, should not have been in the situation they found themselves in and should be free right now." The detentions have become another point of contention in the tensions between the US and Iran, joining Washington's accusations that Iran arms militants in Iraq, fuels unrest in Lebanon and seeks to develop nuclear weapons. Teheran denies those claims and blames Washington for Iraq's instability.