The Iranian authorities are ready to release one of the three US hikers detained last year, state media report.
Tehran chief prosecutor Abbas Jafari-Dolatabadi said Sarah Shourd, 32, would be freed when $500,000 (£325,000) bail was paid, and could leave the country.
Mr Jafari-Dolatabadi had blocked a plan backed by President Mahmoud Ahmadinejad to release her as a good-will gesture.
Ms Shourd and two men, Shane Bauer and Josh Fattal, were detained near Iran's border with Iraq on 31 July 2009.
Their families say they crossed the poorly-demarcated border by mistake while hiking in the mountainous northern Iraqi region of Khormal.
Officials in Tehran said they had "suspicious aims" and that they intended to put them on trial for espionage. But they are still being held without charge more than a year later at Evin prison in Tehran.
US officials have said the three - all graduates of the University of California, Berkeley - are completely innocent.
After seeing her in May, Ms Shourd's mother said she was being denied treatment for serious health problems, including a lump in her breast and precancerous cervical cells.
The three friends were all said to be undernourished and depressed after more than a year in virtual solitary confinement.
At a news conference in the Iranian capital on Sunday, Mr Jafari-Dolatabadi announced that he was prepared to release Ms Shourd.
"Based on reports and the approval of the relevant judge about the sickness of Ms Shourd, her detention was converted to $500,000, and if the bail is deposited she can be released," he told reporters.
"She is not barred from leaving Iran," he added. "The other two detained American hikers will remain in jail."
The chief prosecutor said Ms Shourd's lawyer had been informed.
The BBC's Middle East correspondent, Jon Leyne, says a number of people facing trial in Iran have taken the option of leaving the country and forfeiting their bail, rather than risk facing a long prison term.
Mr Jafari-Dolatabadi said an indictment against the three Americans had been issued and that their cases were ready to be submitted to a court.
There were "enough reasons to accuse the three of espionage", he said. Under Iranian law, it is an offence that can be punishable by death.
"It has been proven that they illegally entered through the border of Kordestan [province]. Also the equipment and supplies they were carrying are only used for spying," Mr Jafari-Dolatabadi was quoted by the Mehr news agency as saying.
The announcement came a day after Mr Jafari-Dolatabadi said he had objected to a plan announced by President Mahmoud Ahmadinejad to release Ms Shourd at the end of the Islamic holy month of Ramadan because legal procedures had "not been completed".
Reporters had been invited to a hotel in Tehran to witness her release on Saturday before it was announced that it had been postponed.
Our correspondent says that with all the recent twists and turns in this case, and the unpredictable mood of the Iranian authorities, Ms Shourd's family will be wary of getting excited about this latest offer.