A bail-for-freedom deal for two Americans jailed as spies in Iran has hit a snag because a judge whose signature is needed on the bail papers is on holiday.

The prisoners' lawyer, Masoud Shafiei, said he could not complete the paperwork on the $1m (£630,000) bail deal because a second judge who must sign the documents is on holiday until Tuesday. One judge signed the papers on Saturday.

"I have no choice but to wait until Tuesday," Shafiei told the Associated Press.

Shane Bauer and Josh Fattal, both 29, have been jailed for more than two years in a case that has deepened the mistrust between Iran and the United States.

They were detained along the Iran-Iraq border in July 2009 with their friend Sarah Shourd. She was released last September with mediation by the Gulf nation of Oman after $500,000 was paid.

The men were convicted of spying for the United States and illegally entering Iran and were each sentenced last month to eight years in prison. They denied the charges and appealed against the verdicts, opening the way for the possible deal to free them in exchange for $500,000 bail each.

They say they were hiking in Iraq's scenic north and may have mistakenly crossed an unmarked border with Iran.

Iran's foreign minister, Ali Akbar Salehi, said on Saturday that the courts were willing to commute the Americans' sentences in the "near future" as a gesture of Islamic mercy, but did not say when the pair could be released.