The United States had three hours warning of the missile strikes after Iran tipped them off via a European embassy and ensured their plans of an attack were easily detectable, U.S. officials claim.

The Iranians prepared for the missile strikes on two Iraqi airbases housing American troops by intentionally making sure U.S. intelligence could detect the plans via satellites and eavesdropping, the officials told TIME magazine.

Intelligence managed to pick up the threat of strikes about three hours before they actually took place, according to the U.S. officials.

One official said the hours-long warning enabled a U.S. military officer to visit one of the bases in Iraq and warn them of when and where the missiles were expected to strike.

The revelations are in stark contrast to remarks made by the top U.S. military officer on Wednesday just hours after President Donald Trump on Wednesday suggested Iran was 'standing down'.

A satellite image (above) of the Ain Al Assad Airbase after Iran's missile attack showing the damage caused to the site after Iran launched ballistic missiles

U.S. officials say they had three hours warning of the Iranian missile strikes after Iran tipped them off about the attacks via a European embassy

Army General Mark Milley, the chairman of the Joint Chiefs of Staff, said earlier that Iran's missile attack intended to kill U.S. personnel at Iraq's al-Asad airbase.

His remarks suggested that Iran was, and perhaps still is, willing to risk major U.S. retaliation.

Iraqi Prime Minister Adel Abdul Mahdi had earlier revealed that Iran had given him a tip-off about the missile strikes, which they were able to pass on and give troops time to seek shelter in bunkers.

Mahdi said Iran did not give specific locations to him but said they would only target locations where U.S. forces were present.

As the missiles were raining down, Mahdi said he received a call from Washington to say they already knew of the assault.

Trump on Wednesday tempered days of angry rhetoric and suggested Iran was 'standing down' - as both sides looked to defuse a crisis over the U.S. killing of a top Iranian general.

Trump said the United States did not necessarily have to hit back after Iran's attack on military bases housing U.S. troops in Iraq, itself an act of retaliation for the January 3 U.S. strike that killed Iranian commander Qassem Soleimani.

Trump said no Americans were hurt in the overnight attacks.

Trump on Wednesday tempered days of angry rhetoric and suggested Iran was 'standing down' - as both sides looked to defuse a crisis over the U.S. killing of a top Iranian general

The Pentagon said Iran had launched 16 short-range ballistic missiles, at least 11 of which hit Iraq's al-Asad air base and one that hit a facility in Erbil but caused no major damage.

'The fact that we have this great military and equipment, however, does not mean we have to use it. We do not want to use it. American strength, both military and economic, is the best deterrent,' Trump said.

'Our great American forces are prepared for anything. Iran appears to be standing down, which is a good thing for all parties concerned and a very good thing for the world,' he said.

Trump said the United States 'will immediately impose additional punishing economic sanctions on the Iranian regime' in response to what he called 'Iranian aggression.' He offered no specifics.

Iranian Supreme Leader Ayatollah Ali Khamenei, addressing a gathering of Iranians chanting 'Death to America,' said the missile attacks were a 'slap on the face' of the United States and said U.S. troops should leave the region.

Foreign Minister Mohammad Javad Zarif had said the strikes 'concluded' Tehran's response to the killing of Soleimani, who built up Iran's network of proxy armies across the Middle East. He was buried in his hometown, Kerman, after days of national mourning.

'We do not seek escalation or war, but will defend ourselves against any aggression,' Zarif wrote on Twitter.

Asked if perhaps Iran would see this as an incomplete mission, given the lack of U.S. fatalities, General Milley said: 'I think it's perhaps too early to tell.'

Iraqi security forces clear away pieces of shrapnel from the Ain al-Asad airbase after it was struck by ballistic missiles fired by Iran as part of operation 'Martyr Soleimani'

Wreckage of a missile that was fired at Ain al-Asad military base in western Iraq but failed to explode on impact

Milley said he and others in the military 'fully expect' Shia militia groups in Iraq, backed by Iran, to carry out attacks against U.S. and U.S.-led forces in Iraq and Syria: 'That's a very real possibility.'

U.S. Defense Secretary Mark Esper, standing alongside Milley, cautioned that the U.S. military remained 'poised and ready.'

Milley and Esper offered the most detail to date about the Iranian missile attack overnight, telling reporters at the Pentagon that Iran fired 16 short-range ballistic missiles from at least three locations inside Iran.

At least 11 of them hit al-Asad, while at least one other missile hit a facility in Erbil, Iraq. The others failed in flight. Esper said targets hit included tents, a helicopter and a parking lot and there was no major damage.

Milley noted the missiles had 1,000 to 2,000-pound warheads on them, each with significant explosive power and 'kill radius.'

'I believe, based on what I saw and what I know, is that (the strikes) were intended to cause structural damage, destroy vehicles and equipment and aircraft and to kill personnel. That's my own personal assessment,' Milley said.

'But the analytics is in the hands of professional intelligence analysts. So they're looking at that.'

Milley and Esper said actions taken by military personnel safeguarded lives, as well as early warning from U.S. military systems that detect such missile activity.

Milley noted that bases like al-Asad have scatter plans, bunkers and protective gear to help protect forces that come under attack.

Esper and Milley said they were unaware of any heads-up from Iraq about the coming attack, after Baghdad said it was notified by Tehran of the strike.

'We tried to give them a quick heads-up from here,' Esper said.

President Donald Trump says 'all is well' and 'so far so good' as the damage and casualties continue to be assessed after Iran fired more than a dozen ballistic missiles at two Iraqi bases housing American troops