BAGHDAD - The Iranian ambassador in Baghdad said the recent release of two Iranians from Iraqi custody is not an indication of any impending deal to free three Americans held by Tehran on spying charges.

Ambassador Hassan Kazemi Qomi said the fate of the Americans, who have been held since July, is in the hands of the Iranian judiciary and has no connection to the release of two Iranians earlier this month.

"There were no deals," Qomi said. "They [Americans] are in the custody of the judiciary system."

The detained Americans - Sarah Shourd, 31; her boyfriend, Shane Bauer, 27; and their friend Josh Fattal, 27 - were arrested along the Iraqi border. Iran has accused them of espionage, but their families say the three were hiking in northern Iraq's mountainous Kurdish region and if they strayed into Iran, it was unintentional.

In a goodwill gesture by Iran, their mothers were allowed to visit them in May - for the first time since they were taken into Iranian custody.