The US sees a direct operational link between the attack on its embassy in Iraq and Tehran, its special representative for Iran, Brian Hook, said on Wednesday.
Iran-backed Iraqi militia members and supporters on Wednesday withdrew from the mission by order of their leaders, ending a 24-hour siege after the arrival overnight of more American troops.
"The attack on our embassy yesterday was orchestrated by Iran," Mr Hook told The National.
He said the Trump administration saw a direct operational link between the attack on Tuesday and the government in Tehran.
“Iran organises, trains and equips Shiite military proxies and we do not make a distinction between the Iranian regime and Iranian militias," Mr Hook said.
“Any attack by an Iranian militia, the Iranian regime will be held accountable."
Mr Hook said the decision by Iraqi militias to withdraw their supporters from the embassy’s perimeter as “a positive development”.
He said the situation was “relatively calm”, and that the US troops sent to Baghdad and Iraqi military posted at the embassy would improve security.
Mr Hook said he expected more sanctions to be imposed on Iran, whose government was “isolated, running out of money and in a state of panicked aggression”.
The attack on the embassy and the withdrawal order from the Popular Mobilisation Forces, the umbrella body of Iraqi militias mainly answering to Iran, highlighted Tehran’s reach in Iraq.
It threatened to raise tension with the US to a level where violence could be difficult to control.
“We call on all of the crowds present near the US embassy to withdraw in deference to the order by the Iraqi government and to preserve the prestige of the state,” the PMF said, according to Russia Today TV.
The Iraqi military later said: "All protesters have withdrawn, tents dismantled and other forms of demonstrating that accompanied these protests have ended, and the Iraqi security forces have completely secured the embassy perimeter."
Militia members and supporters remained camped outside the embassy despite tear gas and stun grenades fired at them earlier on Wednesday by Iraqi or US forces.
US President Donald Trump said earlier that Iran would be held “fully responsible for lives lost, or damage incurred, at any of our facilities”.
Despite the ease with which the crowd entered Baghdad's high-security Green Zone to attack the embassy on Tuesday, their action appeared to be planned to avoid a full assault on the compound or loss of life.
That was in line with a strategy by Washington and Tehran to keep a check on any escalation between the two.
An Iraqi special forces fighter assigned to guard the Green Zone told AFP his units had no orders to intervene.
"If I had had orders to act, I could have fired and stopped the storming of the embassy," he said.
Some buildings outside the embassy compound were set on fire and members of the crowd, some in military fatigues, again hurled stones at the embassy on Wednesday.
The attack recalled the 1979 hostage crisis at the US embassy in Tehran and the 2012 attack on the US mission in the Libyan city of Benghazi.
US military released video of troops being flown in to the embassy after Defence Secretary Mark Esper said on Tuesday that about 750 more soldiers would be sent immediately to Baghdad.
The embassy was attacked in retaliation to US air strikes on Iran-backed Kataib Hezbollah militia sites in Iraq and Syria on Sunday, in which at least 25 of its members were killed and dozens more wounded.
The Pentagon said the raids were in response to a rocket attack on an American base in Kirkuk last week, in which an American contractor was killed.
It was the latest in a series of attacks on US targets in Iraq since Washington intensified sanctions on Iran in mid-2019.
Iran's supreme leader, Ayatollah Ali Khamenei, on Wednesday said on Twitter that he strongly condemned “the US's malice" in the raids on the militia.
Kataib Hezbollah is one of the militias most loyal to Iran in the PMF.
Although the paramilitary forces are nominally integrated into the Iraqi state, some often operate under orders from Iran, the US and Iraqis say.
"Now Iran is orchestrating an attack on the US embassy in Iraq. They will be held fully responsible," Mr Trump said on Twitter.
A spokesman for Kataib Hezbollah said its supporters intended to lay siege to the embassy until it was shut down and US diplomats left Iraq.
The US State Department said all personnel at the embassy were safe and there were no plans to evacuate the compound.
Ambassador Matthew Tueller was said to be on his way back to Baghdad from holidays but had yet to arrive on Wednesday afternoon.