Iran reacted swiftly to the news, summoning a Swiss diplomat who represents American interests in Tehran to protest the detentions, according to the Iranian Foreign Ministry.
Ministry spokesman Mohammad Ali Hosseini called the U.S. action an act of "interference" in Iraq's internal affairs and "inconsistent" with the responsibilities of U.S.-led occupation forces in Iraq.
Four cars carrying the Iranians, as well as seven Iraqis, were stopped at a checkpoint Tuesday evening and then allowed to proceed to the nearby Sheraton Ishtar hotel, where they were later taken into custody and questioned, the military said.
Saadi Othman, an adviser to Gen. David Petraeus, the top U.S. general in Iraq, told British Broadcasting Corp. television that the incident was "regrettable" and had "nothing to do" with President Bush's remarks on Tuesday, when he lashed out at Iran for meddling in Iraq's affairs and fomenting instability here.
Iraqi Foreign Minister Hosyhar Zebari told the British Broadcasting Corp. the Iranians were released after Iraqi officials intervened and told the Americans they were part of an official delegation on a legal visit to discuss electricity cooperation.
Troops seized three weapons from the cars - an AK-47 assault rifle and two 9mm pistols that had been in the possession of the Iraqis in the group. The Iraqis were serving as a protective detail but had no weapons permits, the U.S. military said.
Videotape shot Tuesday night by AP Television News showed U.S. troops leading a group of blindfolded and handcuffed men out of the hotel in central Baghdad. U.S. troops confiscated a laptop, cell phones and a briefcase full of Iranian and American money in the hotel, the military said.
"Following the brief room search the group was taken to a coalition facility for questioning," the U.S. military said in a statement. "The Iranian nationals had passports. It was later determined that two of the Iranian individuals were carrying diplomatic credentials."
All the Iranians were released Wednesday to Iraqi officials, the military said. The fate of the Iraqis - who identified themselves with Iraqi Ministry of Electricity badges - was not immediately clear, and the military did not say whether the confiscated items were returned.
The electricity ministry declined comment.
An Iranian diplomat, who refused to give his name, told The Associated Press that one of those released contacted the embassy Wednesday morning to say that they had been handed over to Iraqi authorities.
"At 7 a.m. today, a member of the delegation called the embassy and said they are now at the prime minister's office," the diplomat said. "The Americans released them. They held them until seven this morning."
The Iranian embassy said the Iranians included two embassy staffers and six members of a delegation from Iran's Energy Ministry. The diplomat had earlier said there were seven Iranians held and one diplomat.
The embassy said the men had not yet been in to explain in full what happened, and that it was not sure whether their belongings had been returned.
An al-Sadr spokesman said the suspension of activities would mean the militia will not launch attacks against U.S. and coalition forces.
The aide, Sheik Hazim al-Araji, said on Iraqi state television that the goal was to "rehabilitate" the organization, which has reportedly broken into factions, some of which the U.S. maintains are trained and supplied by Iran.
"We declare the freezing of the Mahdi Army without exception in order to rehabilitate it in a way that will safeguard its ideological image within a maximum period of six months starting from the day this statement is issued," al-Araji said, reading from a statement by al-Sadr.
The order was issued following two days of bloody clashes in theShiite holy city of Karbala which claimed more than 50 lives. Iraqi security officials blamed Mahdi militiamen for attacking mosque guards, some of whom are linked to the rival Badr Brigade militia.
A spokesman for al-Sadr, Ahmed al-Shaibani, denied that the Mahdi Army was involved in the Karbala fighting. Al-Sadr called for an independent inquiry into the clashes and urged his supporters to cooperate with the authorities "to calm the situation down," al-Shaibani said.
U.S. forces detained the eight Iranians against the backdrop of increasing tensions between Washington and Tehran over the detention of each other's citizens, as well as U.S. accusations of Iranian involvement in Iraq's violence and alleged Iranian efforts to develop nuclear bombs.
Iran has constantly complained about the U.S. detention since Jan. 11 of five Iranians who were in the northern Iraqi city of Irbil. U.S. officials say the five include the operations chief and other members of Iran's elite Quds Force, which is accused of arming and training Iraqi militants.
The Iranian regime denies any involvement in the violence wracking its neighbor.
On Tuesday President Bush strongly criticized Iran in a speech to the American Legion convention in Reno, Nev., in which he presented a ringing defense of the unpopular Iraq war effort.
"I have authorized our military commanders in Iraq to confront Tehran's murderous activities," said Bush, whose administration has accused Iran of arming Shiite militias in Iraq. "The Iranian regime must halt these actions."
The strains have many people in the region worried about the possibility of fighting between the U.S. and Iran.
But while making his latest defense of Iran's nuclear program earlier Tuesday, Iranian President Mahmoud Ahmadinejad dismissed the possibility of any U.S. military action against Iran, saying Washington has no plan and is not in a position to take such action.
Ahmadinejad declared that U.S. political influence in Iraq is "collapsing rapidly" and that Tehran is ready to help fill any power vacuum.