US President Donald Trump has said Iran "appears to be standing down" after it fired missiles at air bases housing US forces in Iraq.
Mr Trump, in a televised address from the White House, said no US or Iraqi lives were lost in the attacks and the bases suffered only minimal damage.
The Irbil and Al Asad bases were attacked early on Wednesday local time.
Iran said it acted in retaliation after the assassination of top Iranian General Qasem Soleimani last week.
The US drone strike targeting him and Iran-backed militia figures in the Iraqi capital Baghdad was a major escalation amid already deteriorating relations between Iran and the US.
Iran's Supreme Leader Ali Khamenei described the missile attacks as a "slap in the face" for the US and called for an end to the American presence in the Middle East.
On Wednesday evening at least two rockets fell in Baghdad's heavily fortified Green Zone, where the US embassy is located. There were no reports of any damage or casualties.
The US attack on Soleimani killed members of pro-Iranian Iraqi militias, who have also said they would seek revenge.
However, US Vice President Mike Pence told CBS News that "intelligence" indicated that Iran had asked its allied militias not to attack US targets.
"We're receiving some encouraging intelligence that Iran is sending messages to those very same militias not to move against American targets or civilians, and we hope that that message continues to echo," Mr Pence told the news channel.
What did Mr Trump say on Wednesday?
The president has previously threatened military action against Iran if it were to target US personnel and bases, but he did not announce any military action, saying Iran's attack had caused no casualties.
"No Americans were harmed in last night's attack by the Iranian regime," he said.
"Iran appears to be standing down, which is a good thing for all parties concerned," he added.
He also said that "American strength, both military and economic, is the best deterrent". "The fact that we have this great military and equipment, however, does not mean we have to use it."
Mr Trump also said the US would immediately impose additional financial and economic sanctions on Iran, which would remain until it "changed its behaviour".
"Iran must abandon its nuclear ambitions and end its support for terrorism," he said.
"The civilised world must send a clear and unified message to the Iranian regime. Your campaign of terror, murder and mayhem will not be tolerated any more. It will not be allowed to go forward."
Back to business as usual?
President Trump's speech was a curious amalgam of threats, bluster - a touch of de-escalation.
Nonetheless he still slapped on more economic sanctions against Tehran. He triumphed in the killing of Gen Soleimani, whom he described as "the world's top terrorist".
But there were essentially three key messages. First, de-escalation. There were no US casualties caused by the Iranian missile strikes. He said that Iran was "standing down", presumably returning its deployed missile forces to their bases. He did not threaten an immediate US response.
Secondly - the nuclear deal. He called upon the other signatories to the 2015 nuclear agreement - the JCPOA - which the US long ago abandoned, to similarly give it up as a bad job.
Thirdly, stressing US energy independence, he called upon Nato countries "to become much more involved in the Middle East process". This will inevitably be seen as another signal that the US is tiring of its role in the region and THAT will not be welcomed by his allies either in the Middle East or in Nato.
So this was a speech full of Trumpian contradiction and the few references to a brighter future for the Iranian people provided little tangible hope of any new diplomatic initiative. So in the wake of the US drone attack and Iran's missile strikes it appears to be back to business as usual.
What happened in the missile attacks?
A total of 16 missiles were launched from at least three sites in Iran, Defence Secretary Mark Esper said.
At least 11 of them struck the air base in Al Asad, west of Baghdad, and at least one more hit the Irbil base, he said.
Several other missiles landed at some distance from the targets.
The attacks happened at about 02:00 local time on Wednesday (22:30 GMT on Tuesday).
Joint Chiefs Chairman Mark Milley said he believed early warning systems had prevented casualties.
"[What] I believe, based on what I saw and what I know, is that they were intended to cause structural damage, destroy vehicles and equipment and aircraft, and to kill personnel," he said.
The attacks came just hours after the burial of Soleimani, who controlled Iran's proxy forces across the Middle East.
It was the most direct assault by Iran on the US since the seizing of the US embassy in Tehran in 1979.
Just hours after the missile strikes a Ukrainian airliner crashed in Iran shortly after take-off. There is no evidence that the two incidents are linked.
Several airlines have announced they are avoiding both Iranian and Iraqi airspace amid the rising tension.
How did we get here?
The assassination of Soleimani - head of the Revolutionary Guards' elite Quds Force and architect of Iranian policy in the region - took place on 3 January.
The general was regarded as a terrorist by the US government, which says he was responsible for the deaths of hundreds of American troops and was plotting "imminent" attacks.
Iran vowed "severe revenge" for his death. Mr Trump, meanwhile, warned the US would respond in the event of retaliation "perhaps in a disproportionate manner".
Millions of Iranians turned out for the commander's funeral, with mourners chanting "death to America" and "death to Trump".
A stampede at the burial in Soleimani's hometown Kerman killed 50 people and injured 200 more on Tuesday.