Details of the evidence against Ms Saberi have not been made public
A court in Iran has cut US-Iranian reporter Roxana Saberi's jail sentence to two years suspended, and will free her later on Monday, her lawyer says.
The court heard Ms Saberi's appeal against her original eight-year prison sentence on Sunday, after an international outcry.
She will be able to leave the country but has been banned from working as a journalist in Iran for five years.
Ms Saberi was convicted of spying for the US in April but denies the charge.
The case sparked international attention and protests calling for her to be released. US President Barack Obama was among those who appealed on her behalf.
Washington has no diplomatic ties with Tehran, but said contact was made through Swiss intermediaries to determine whether Ms Saberi was being treated well.
There was also concern from within Iran: film director Bahman Ghobadi, whose work has won prizes in Cannes and Berlin, said Ms Saberi was a victim of Iran's "political games".
Her father Reza expressed joy at the ruling and said he and his wife Akiko were on the way to collect
from the jail, describing her as "practically free".
ROXANA SABERI'S DETENTION
- Arrested for buying a bottle of wine
Later charged with working illegally as a journalist
- accused of spying
- sentenced to eight years in jail
- goes on hunger strike for two weeks
- appeal heard
"We are very happy," he said, quoted by AFP news agency. "We heard the news half an hour ago, we are going to Evin prison to take her home."
"Her sentence was cut down to two years with five years suspense [suspended], so after five years if... nothing [else has] happened those two years will be forgiven."
One report quoted a judicial source as saying she had already been allowed to leave.
The five-hour appeal was far longer than the original trial - and before it began Ms Saberi was allowed a half-hour meeting with her lawyer, Abdolsamad Khorramshahi.
Other accounts of the hearing said Ms Saberi - looking a little bewildered - had visibly lost weight from the two-week hunger strike that she only recently ended.
Details of the evidence against her have still not been made public, and it is not clear why the hearing was brought forward.
Unlike her original trial, the legal process this time was arranged to appear fair and open, says the BBC's Jon Leyne.
Ms Saberi's appeal was heard before a panel of three judges, with representatives of the Iranian Bar Association present.
They ruled that her case should be considered under a different section of Iran's criminal code, effectively freeing her on legal grounds.
Whether that decision came about as a result of political pressure behind the scenes might never be known, our correspondent adds.
Ms Saberi has been held in Tehran's Evin prison since her arrest in January.
The journalist originally faced a less serious accusation of buying alcohol, and later of working as a reporter without a valid press card.
The spying charge was introduced soon afterwards, and she was tried and sentenced behind closed doors by the Revolutionary Court in Tehran.
Ms Saberi, who holds dual US and Iranian citizenship, has spent six years in Iran studying and writing a book.
She has worked as a freelance journalist for news organisations including the BBC and the US-based National Public Radio.