Two American hikers imprisoned in Iran for more than two years were sentenced to eight years on Saturday on charges of illegal entry and espionage.

Their families hoped authorities would free them during the Islamic month of Ramadan, when pardons are often handed down.

In a statement released Sunday, the families asked people to pray that "Shane and Josh will be released." They also pleaded with the "authorities in Iran to show compassion and allow them to return home," The Associated Press reported.

Both men pleaded not guilty to the charges. Their lawyer, Masoud Shafiei, said he would appeal the verdict.

Josh Fattal, Shane Bauer and Sarah Shroud were arrested in 2009 when they inadvertently entered Iran while hiking in the northern Iraq.

Shroud was released on $500,000 bail in September 2010, but Iranian authorities refused to release her two companions.

Iranian chief prosecutor Jafari Dowlatabadi said Shroud's case "is still open and [she] will be tried in absentia."

Secretary of State Hillary Clinton said she is "deeply disappointed" with the sentence.