Donald Trump has said the US may act "disproportionately" if Iran attacks any American "person or target" in revenge for the killing of Major General Qassem Soleimani.
The US president tweeted after Tehran vowed to the avenge the death of its top general, who died in a US drone strike.
Mr Trump wrote: "These Media Posts will serve as notification to the United States Congress that should Iran strike any U.S. person or target, the United States will quickly & fully strike back, & perhaps in a disproportionate manner.
"Such legal notice is not required, but is given nevertheless!"
Meanwhile, Iraq is intending to expel foreign troops following Friday's deadly airstrike in Baghdad.
The Iraqi parliament also wants the government to ensure foreign troops do not use its land, air and waters for any reason.
It came after Iraq's foreign ministry denounced the US drone attack as a "blatant" violation of sovereignty and a breach of the agreement between Iraq and the US-led coalition.
The ministry added Iraqi soil should not be used to attack its neighbouring countries.
Parliament resolutions are non-binding to the government, but Iraqi Prime Minister Adel Abdul-Mahdi had earlier called on MPs to end the presence of foreign troops.
The US has said it is "disappointed" by the vote in Iraq's parliament and urged the country's leaders to consider the importance of the US-Iraq economic and security relationship, as well as the role of the US-led coalition in defeating Islamic State.
Populist Iraqi Shia cleric Moqtada al Sadr said the parliamentary resolution does not go far enough and called on local and foreign militia groups to unite.
He said: "I consider this a weak response insufficient against American violation of Iraqi sovereignty and regional escalation."
The cleric also said a security agreement with the US should be cancelled immediately, the US embassy in Baghdad should be closed down, American troops must be expelled in a humiliating manner, and communication with the US government should be criminalised.
Sky's foreign affairs editor Deborah Haynes said: "British officials are hoping any final decision by Iraq's government on foreign forces will be caveated to enable troops to stay in Iraq at least for now, with any exit happening over a period of time rather than instantly, according to a diplomatic source."
In other developments:
Sayyed Hassan Nasrallah, the leader of Hezbollah in Lebanon, has said the US military in the Middle East will pay the price for the assassination of the top general.
Mr Nasrallah, speaking in a televised addressed commemorating Soleimani's death, said responding to the killing was not only Iran's responsibility but the responsibility of its allies in the region too.
He added that US civilians in the region "should not be touched", saying this would serve US President Donald Trump's agenda.
US Secretary of State Mike Pompeo defended targeting Maj Gen Soleimani in Friday morning's airstrike outside Baghdad airport, telling ABC News the intelligence assessment on Iran's effective second-in-command was "clear".
He added that the US will respond with "lawful strikes" against any retaliatory attacks on American targets.
In a separate interview with MSNBC, Mr Pompeo said: "The intelligence community presented us a set of facts that made clear that the risk from doing nothing exceeded the risk of taking the action that we took."
As the secretary of state spoke in the US, Iraq's foreign ministry summoned the US ambassador due to "repeated US airstrikes", a statement said.
On Saturday, Iran threatened to punish Americans within reach of the country, naming Tel Aviv and ships sailing through the Gulf.
Mr Trump reacted by tweeting the US has targeted 52 Iranian sites that "will be hit very fast and very hard" if Iran strikes any Americans or American assets.
Iranian foreign minister Mohammad Javad Zarif warned: "A reminder to those hallucinating about emulating ISIS war crimes by targeting our cultural heritage: Through MILLENNIA of history, barbarians have come and ravaged our cities, razed our monuments and burnt our libraries.
"Where are they now? We're still here, and standing tall."
Speaking after Mr Zarif's tweet, Mr Pompeo said any target the US military may strike - if Iran retaliates - would be legal under the laws of armed conflict, which prohibits the deliberate targeting of cultural sites under most circumstances.
He also said Mr Trump has abandoned the previous US administration's focus on countering Iranian proxy groups across the region and suggested the US airstrike that killed Maj Gen Soleimani was an example of this new strategy.
Iran's information and telecommunications minister Mohammad Javad Azari-Jahromi tweeted: "Like ISIS, Like Hitler, Like Genghis! They all hate cultures.
" Trump is a terrorist in a suit . He will learn history very soon that NOBODY can defeat."