Iran has carried out a ballistic missile attack on air bases housing US forces in Iraq, in retaliation for the US killing of General Qasem Soleimani.
More than a dozen missiles launched from Iran struck two air bases in Irbil and Al Asad, west of Baghdad.
It is unclear if there have been any casualties.
The initial response from Washington has been muted. President Trump tweeted that all was well and said casualties and damage were being assessed.
Iran's Revolutionary Guards said the attack was in retaliation for the death of Soleimani on Friday — killed in a missile strike outside Baghdad airport on the orders of President Trump .
"We are warning all American allies, who gave their bases to its terrorist army, that any territory that is the starting point of aggressive acts against Iran will be targeted," a statement said.
Iranian Foreign Minister Mohammad Javad Zarif later issued a statement on Twitter, claiming the attack was self-defence and denied seeking to escalate the situation into war.
The BBC's Middle East editor Jeremy Bowen in Baghdad says the tweets appear to suggest that Iran wishes to draw a line under its retaliation for the assassination of Soleimani.
Two Iraqi bases housing US and coalition troops were attacked - one at Al Asad and one in Irbil.
Tehran fired more than a dozen ballistic missiles from Iranian territories at about 2:00am local time (10.30pm GMT), just hours after the burial of Soleimani.
The Al-Asad airbase - located in the Anbar province of western Iraq - was hit by at least six missiles.
Earlier in the day, President Trump said a US withdrawal of troops from Iraq would be the worst thing for the country.
His comments came in the wake of a letter, which the US military said had been sent in error, to Iraq's prime minister.
The US has around 5,000 troops in Iraq.
The UK foreign office told the BBC: "We are urgently working to establish the facts on the ground. Our first priority is the security of British personnel."
The UK has put the Royal Navy and military helicopters on standby amid rising tensions in the Middle East, Defence Secretary Ben Wallace said earlier.
How did we get here?
The assassination of Soleimani on January 3 was a major escalation in already deteriorating relations between Iran and the US.
The general - who controlled Iran's proxy forces across the Middle East - 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".
"He was a monster. And he's no longer a monster. He's dead," Mr Trump said, defending his decision. "He was planning a big attack, a bad attack for us. I don't think anyone can complain about it."
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.
After the event resumed, top Iranian officials renewed their threats of revenge.
"The martyr Qasem Soleimani is more powerful... now that he is dead," the Revolutionary Guards' commander-in-chief, Maj Gen Hossein Salami, told the crowds.
How does Iraq fit into this?
Iran supports a variety of Shia militia groups in neighbouring Iraq. On Friday, Soleimani had just arrived at Baghdad airport and was travelling in a convoy alongside officials from such groups when their cars were hit by several US missiles.
Iraq now finds itself in a difficult position as an ally both of Iran and of the US. Thousands of US troops remain in the country to assist in the broader struggle against the Sunni Islamic State (IS) group but Iraq's government insists the US has acted beyond the terms of this agreement.
Prime Minister Adel Abdul Mahdi labelled the missile strike that killed Soleimani as a "brazen violation of Iraq's sovereignty and a blatant attack on the nation's dignity".