In the early hours of 8 January, Iran launched attacks on Iraqi bases housing US forces in retaliation for a US drone strike in Baghdad last Friday that killed a top Iranian general, Qasem Soleimani.
But despite furious warnings from Tehran that the US would pay a significant price for that killing - no-one was hurt by the retaliatory attack, according to US President Donald Trump.
So did Iran intentionally avoid causing casualties?
What did Iran and the US say?
A statement from Iran’s Islamic Revolutionary Guards Corps (IRGC) said “tens of surface-to-surface missiles” were launched early on Wednesday “to crush the occupied air base of terrorist and aggressor army of the US in Al Asad”, the hub for American military operations in western Iraq.
Iran’s Tasnim news agency, which is close to the IRGC, reported that Fateh-313 and Qiam missiles were used in the attack , and that US forces failed to intercept them because they were equipped with cluster warheads. The warheads also caused “tens of explosions” at Al Asad, it said.
The US defence department said Iran launched more than a dozen ballistic missiles that targeted at least two Iraqi military bases - Al Asad and Irbil, in the semi-autonomous Kurdistan Region.
Mr Trump said US forces suffered no casualties as a result of the Iranian missile attacks, and that the bases sustained “only minimal damage”. In a televised statement, he credited “the precautions taken, the dispersal of forces, and an early warning system that worked very well”, and declared: “Iran appears to be standing down.”
However, the US’s top military officer, Army General Mark Milley, said he believed the attack was meant to be deadly.
He said his “personal assessment” was that Iran “intended to cause structural damage, destroy vehicles and equipment and aircraft, and to kill personnel”.
What did the missiles actually hit?
Iraq’s military, which also reported no casualties, said the country was hit by 22 missiles between 01:45 and 02:15 on Wednesday (22:45-23:15 GMT on Tuesday). It said 17 missiles were fired towards Al Asad air base.
Satellite photographs taken by the commercial company Planet Labs for the Middlebury Institute of International Studies showed what appeared to be at least five destroyed structures at Al Asad. David Schmerler, an analyst at the Middlebury Institute, told NPR : “Some of the locations struck look like the missiles hit dead centre.”
But it was clear that some of the weapons did not hit the bases. Two of the missiles aimed at Al Asad fell in the Hitan area, west of the town of Hit, and did not explode, according to the Iraqi military.
Photos of the remnants of one of those missiles, including three large parts of its fuselage, subsequently emerged on social media.
The Iraqi military said Iran fired five missiles towards Irbil air base, in the northern Kurdistan region. It did not say how many hit the base, but state TV reported that two missiles landed in the village of Sidan, 16km (10 miles) north-west of the city of Irbil, and that a third missile came down in the Bardah Rashsh area, about 47km north-west of Irbil.
Journalists meanwhile photographed security forces retrieving debris from what they believed was the crater caused by the missile that hit Bardah Rashsh.
Did Iran try to avoid US casualties?
US and European government sources told Reuters news agency) that they believed the Iranians had deliberately sought to minimise casualties and avoid hitting US facilities in order to prevent the crisis escalating out of control while still signalling their resolve.
CNN journalist Jake Tapper quoted a Pentagon official as saying that Iran “deliberately chose targets that would not result in loss of life”.
The Washington Post reported that US officials said they knew by Tuesday afternoon that Iran intended to attack American targets in Iraq, although it was unclear which ones.
An early warning came from intelligence sources as well as communications from Iraq that conveyed Iran’s intentions to launch the strike, the paper said.
David Martin, Pentagon correspondent for the BBC’s US partner CBS, said a defence official told him the US was warned of the attack “multiple hours” before, giving plenty of time for troops to take shelter in bunkers.
The source said this warning came from a combination of satellites and signals and communications intercepts - the same systems that watch for North Korean tests.
But Mr Martin said he had not found anybody, including one very senior officer, who knew anything about a heads-up from the Iraqi prime minister. This official did not agree with speculation that Iran was aiming to miss.
“Our movements saved American lives,” the official told him.
BBC defence correspondent Jonathan Marcus said: “Whether this was by design, or just due to shortcomings with the manufacture and accuracy of their missiles, as yet remains unclear. However, launching long range missiles against US bases is a risky way of making a point.”
He added: “Looking at the initial civilian satellite pictures of the impacts of the Iranian missiles at Al Asad air base, they appear to have destroyed several structures, so the lack of casualties could be as much by luck rather than design.”