TEHRAN, Iran (CNN) -- An imprisoned Iranian-American journalist accused of spying for the United States was freed Monday, ending a four-month ordeal that became a focal point of tension between Washington and Tehran.

"We are very happy," Roxana Saberi's father said as he waited for his daughter outside Evin prison.

Noting that at one point during her incarceration his daughter underwent a hunger strike and had to be hospitalized, Reza Saberi added, "She was very desperate to get out. ... She was quite relieved to know that the whole world is supporting her."

In Washington, White House Press Secretary Robert Gibbs said President Obama was "relieved" at the news of the release.

"We know that this has been a trying time for her family and friends, and he looks forward to welcoming her home to the United States," Gibbs said at a daily news briefing. "We want to continue to stress that she was wrongly accused, but we welcome this humanitarian gesture."

Roxana Saberi, 32, was convicted last month on espionage charges in a one-day trial closed to the public. She was sentenced to eight years in prison. She denies the charges.

Monday's reversal came a day after Iran's court of appeals heard her case.

The court agreed with Saberi's lawyers that because Iran is not at war with the United States, Saberi cannot be punished for cooperating with agents of a nation at war with Iran, according to Saberi's spokesman, Abdolsamad Khorramshahi.

Her sentence was changed to a two-year jail term suspended for five years, Iran's state-run news agency IRNA reported.

State-run Press TV, citing "officials close to the case," reported that the suspended sentence "will be automatically abolished if Saberi shows no unlawful conduct in the next five years."

"Obviously, we continue to take issue with the charges against her and the verdicts rendered," U.S. Secretary of State Hillary Clinton said. "But we are very heartened that she has been released and wish her and her family all of the very best we can send their way."

Reza Saberi said the family will return to their home in the United States "as soon as we can make arrangements for the trip."

Through her ordeal, Roxana Saberi, who has lived in Iran since 2003 and reported for several news organizations, became a symbol of the fight for journalists' freedoms worldwide.

"We are thrilled," said Joel Simon, executive director of the Committee to Protect Journalists. "But this is also a moment to reflect on the difficult conditions that Iranian journalists endure every day. Several Iranian journalists remain jailed today. We urge they be given the same opportunity for judicial review that was afforded to Roxana Saberi."

Dave Aeikens, president of the Society of Professional Journalists, said, "Iran has a long way to go in guaranteeing freedom of the press, but this is one small indication that there is hope for the future."

The fight for Saberi's freedom took an unusual twist last month, when Iranian President Mahmoud Ahmadinejad sent a letter to Tehran's prosecutor calling for justice in her case and the case of Hossein Derakhshan, an Iranian-Canadian blogger imprisoned in the country since November.

Reporters Without Borders, a group that fights for journalists' rights worldwide, says Derakhshan was sentenced to four years in prison for disseminating the views of one ayatollah and for "publicity against the government."

Saberi was detained in January after initially being accused of buying a bottle of wine and working as a journalist without proper accreditation, according to the Committee to Protect Journalists.

She was soon charged with espionage.

"Without press credentials and under the name of being a reporter, she was carrying out espionage activities," Hassan Haddad, a deputy public prosecutor, recently told the Iranian Student's News Agency.

Authorities said Saberi confessed. Her father has said he thinks she was coerced into making damaging statements.

The whole experience has been "very depressing" for her, and she has gone through a great deal of frustration, Saberi's father said Monday. "It will take some time before she can overcome it."

He added, "It's not the [Iranian] people; they are very friendly. We don't understand why it happened."

All About Roxana Saberi • Iran • Mahmoud Ahmadinejad