Iranian President Mahmoud Ahmadinejad said Tuesday that Tehran would soon release two US hikers convicted of spying but who claimed to have accidentally strayed into the country.
"I am helping to arrange for their release in a couple of days so they will be able to return home. This is, of course, going to be a unilateral humanitarian gesture," Ahmadinejad told The Washington Post.
"It is a unilateral pardon" of the hikers, the Iranian leader said.
In a separate interview with US network NBC News, Ahmadinejad said Shane Bauer and Josh Fattal -- whose jailing has further strained already difficult relations between Washington and Tehran -- would be released "in two days."
But their lawyer Masoud Shafii told AFP that they would be freed only when bail, set at $500,000 for each of the men, had been paid.
"The Americans will be freed when the bail is paid," their lawyer told AFP, adding that the judiciary had informed him of its decision in the middle of the day Tuesday and that he had yet to contact their families.
The news drew an optimistic response from the families of the hikers, who were each sentenced to eight years in jail last month on charges of espionage and illegal entry.
"While we do not have further details at this time, we are overjoyed by the positive news reports from Iran," said a statement issued by the families.
"Shane and Josh's freedom means more to us than anything and it's a huge relief to read that they are going to be released," the statement said.
"We're grateful to everyone who has supported us and looking forward to our reunion with Shane and Josh. We hope to say more when they are finally back in our arms."
A guarded US Secretary of State Hillary Clinton said: "We have followed this very closely and we are encouraged by what the Iranian government has said today."
She added: "We obviously hope that we will see a positive outcome from what appears to be a decision by the government."
Signup to our newsletter and follow us on Facebook and Twitter!
The Swiss mission, which looks after US interests in Iran, said earlier Tuesday that it was not immediately able to confirm the Iranian judiciary's decision.
Ahmadinejad said in the interview with NBC's "Today Show" program that a decision had been made to pardon Bauer and Fattal despite the court's finding last month that the pair "illegally crossed our borders and they were arrested by the border guards."
But the Iranian leader suggested that freeing the men would do little to improve bitter relations between Washington and Tehran.
"You know how many Iranians are now in the American jails?" he said.
"It's not about only two people in Iran. These two people are having the very good condition here in prison. It's like staying in a hotel," said Ahmadinejad.
"I think the problem is in the approach of the American politicians and leaders. Why the American leaders are so hostile against us?"
Bauer and Fattal were arrested near the mountainous Iraq-Iran border in July 31, 2009, along with a third hiker, Sarah Shourd, who was granted bail on humanitarian and medical grounds and allowed to leave Iran in September 2010.
Her bail, too, was set at $500,000 and was paid through Oman, a US Gulf ally that maintains relations with Iran.
Shafii announced late last month that he had lodged an appeal against his clients' conviction.
The trio have consistently maintained that they innocently strayed across the unmarked border with Iran while hiking in Iraq's northern Kurdistan region.
The jailing of Bauer and Fattal sparked anger in Washington which already has deep differences with Tehran over its controversial nuclear program, its refusal to recognize Israel and its support for militant groups across the Middle East.
US President Barack Obama regarded the jail terms handed down against the pair as "an abomination," a top White House diplomatic nominee said last week.
Washington and Tehran have had no diplomatic relations since the aftermath of the Islamic revolution of 1979 when Islamist students seized the US embassy in Tehran.