Iranian Masoud Shaffi, the lawyer for the American hikers, speaks with the media on his phone at his office in Tehran on August 21, 2011. (Behrouz Mehri/AFP/Getty Images)

Two Bay Area men were sentenced to eight years in prison on Sunday for their alleged espionage against the Islamic Republic of Iran. Shane Bauer, Josh Fattal and Sarah Shourd said they were hiking in Iraq’s northern border, near Iran in July, 2009 when they were arrested by Iranian authorities. Shourd was released last September due to health reasons.

The lawyer for the three, Masoud Shafiei, told the Associated Press he received his clients’ verdict on Sunday, noting his clients are innocent and he will appeal.

“I will use entire legal capacity to defend them,” he said.

The AP reports that Iran’s chief prosecutor confirmed the sentences and said the three have 20 days to appeal. Shourd’s case will be tried despite her absence, prosecutor Jafari Dowlatabadi said. She was released on $500,000 bail, but has stated she will not return for the trial.

Despite this sentence, Iran’s ambassador to Iraq, Hassan Dannaie Fir, said told the AP he expects the two men to be freed “very soon,” but declined any specific details on their release.

Iran’s Foreign Minister Ali Akbar Salehi made similar comments to the AP earlier this month, saying 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.”

Fir and Salehi have hinted that Bauer and Fattal could recieve an early release because pardons are traditionally issued during Ramadan, the Muslim holy month. The tradition calls for Muslims to show special mercy and kindness. This year, Ramadan is observed from August 1 until August 29.

“We are encouraged that the Iranian Foreign Minister, Ali Akbar Salehi, has said he hopes the case will proceed in a manner that will result in Shane and Josh’s freedom. We appeal to the authorities in Iran to show compassion and allow them to return home to our families without delay.

We also ask everyone around the world who trusts in the benevolence of the Iranian people and their leaders to join us in praying that Shane and Josh will now be released.”

However, the final decision on their release rests in the hands of the Grand Ayatolla Ali Khamene-i, the supreme religious leader of the country.