US forces say the five men seized in the northern city were held on suspicion of being members of the Iranian Revolutionary Guards' elite Qods force.

Iran has insisted that they are diplomats and has demanded their release.

"These individuals have been assessed to be of no continuing value, nor do they pose a further threat to Iraqi security," Smith said.

Hoshiyar Zebari, Iraq's foreign minister, welcomed the announcement, saying it was a confidence-building measure that would encourage more productive talks between Iran, Iraq and the US.

"We have tried very hard with the American military and the embassy to release them. We are very pleased now that a decision has been made," he told the Reuters news agency.

Consulates opened

On Tuesday, Iran opened two consulates in Iraq, a facility in Erbil that was shut by American forces after January's raid, and a second in Sulaimaniya, the largest city in the Kurdish zone.

The Iranian ambassador used the occassion to condemn the US raid on the building.

Hassan Kazemi Qomi said: "The American forces breached Iraqi sovereignty by detaining the five Iranian diplomats at this same office in Erbil.

"Iran has strong ties with Iraqi society and opening these consulates will strengthen these ties. It will also strengthen commerce and travel between the two sides."

Washington has accused Tehran of training Shia militias in Iraq and supplying them with weapons including roadside bombs. Iran has rejected the charge and blames the violence on the US-led invasion in 2003.

Ryan Crocker, US ambassador to Iraq, has held three rounds of talks this year with his Iranian counterpart on security in Iraq. On Saturday, he said that he expected a further round of meetings in the next few weeks.