Last Updated 11:30 a.m. ET
TEHRAN - Two American men arrested more than two years ago while hiking along the Iraq-Iran border have been sentenced to eight years in prison for espionage and illegally entering Iran, state TV reported Saturday.
The announcement appeared to dash hopes for the imminent release of Shane Bauer and Josh Fattal after Iran's foreign minister suggested earlier this month that the trial could clear the way for their freedom.
It also could bring added tensions to Iranian President Mahmoud Ahmadinejad's expected visit to New York next month for the annual general assembly at the United Nations.
The Americans, whose final court hearing was three weeks ago, deny the charges and say they were only hiking in a scenic and largely peaceful area of northern Iraq near the porous border.
The two men were detained in July 2009 along with a third American, Sarah Shourd, who was released in September 2010 on $500,000 bail and returned to the United States.
Shourd's case "is still open," the website irinn.ir reported.
Bauer and Fattal, who are both 29, have been sentenced to three years each for illegal entry into Iran and five years each for spying for the United States, the website quoted "informed sources" at Iran's judiciary as saying. It was not immediately clear if that includes time served. They have 20 days to appeal the sentence.
Their Iranian attorney, Masoud Shafiei, said he has not been notified of the verdict but he will definitely appeal the sentence if true.
"I've not been notified of any verdict in the case of my clients," Shafiei told The Associated Press. "This is a strong verdict inconsistent with the charges."
The Americans say they mistakenly crossed into Iran when they stepped off a dirt road while hiking near a waterfall. While other parts of Iraq remain troubled by violence, the semiautonomous Kurdish north has drawn tourists in recent years, including foreigners.
The case has added to tensions between the United States and Iran that were already high over other issues, including Tehran's disputed nuclear program.
The U.S. government has appealed for the two men to be released, insisting that they have done nothing wrong. The two countries have no direct diplomatic relations, so Washington has been relying on an interests section at the Swiss Embassy in Tehran to follow the case.
Earlier this month, Foreign Minister Ali Akbar Salehi said he hoped "the trial of the two American defendants who were detained for the crime of illegally entering Iran will finally lead to their freedom." Their lawyer also had expressed hope they might receive a pardon for the Islamic holy month of Ramadan.
Phone and email messages left for Sarah Shourd, relatives of the two men and the families' spokeswoman Samantha Topping were not immediately returned.
Shourd is back living in Oakland, California; Bauer grew up in Onamia, Minnesota; and Fattal is from suburban Philadelphia.
The last direct contact family members had with Bauer and Fattal was in May 2010 when their mothers were permitted a short visit in Tehran.
To mark the second anniversary of their detention, U.S. State Department spokesman Mark Toner urged Iran to free the Americans.
"Shane and Josh have been imprisoned too long, and it is time to reunite them with their families," Toner said.