U.S. military officials were warned about Iran’s pending ballistic missile strike “when the air defense systems went active” shortly before the attack was launched, a U.S. official in Baghdad told Fox News on Wednesday. 

U.S. intelligence picked up "chatter" from Iran and inside Iraq, tipping off American forces to a strike around 1:30 a.m. local time -- or 5:30 p.m. ET.  Soon after, Iran launched more than a dozen short-range ballistic missiles into Iraq, striking military bases housing American and coalition troops. 

Officials said there were no reported casualties. 

IRAN'S SUPREME LEADER CALLS MISSILE STRIKE AT BASES A 'SLAP IN THE FACE,' WARNS IT'S NOT ENOUGH

The Iranian strikes -- the country's most brazen direct assault on America since the 1979 seizure of the U.S. Embassy in Tehran -- targeted two bases, one in the northern Iraqi city of Irbil and the other at Ain al-Asad in western Iraq. 

President Donald Trump, in an address to the nation on Wednesday, said American and Iraqi forces suffered no casualties and there was minimal damage at the military bases because "of the precaution was taken, dispersal of forces and an early warning system that worked very well." 

"I salute the incredible courage of America's men and women in uniform," he said. 

A senior U.S. official told Fox News that Iranian officials warned Iraq about the pending missile attack because Tehran did not want to kill Iraqi forces.  Some Iraqi forces also warned their American counterparts, however, the U.S. had already known "for hours" that Iran was planning to launch the attack. 

"That warning was not a surprise to us," the U.S. official added. " We already knew it was coming." 

IRANIAN OFFICIAL TWEETS PHOTO OF IRANIAN FLAG AFTER ATTACK ON US TROOPS IN IRAQ

Pentagon officials told Fox News the advance warning of the Iranian missile attack is the reason Defense Secretary Mark Esper held a hasty press conference Tuesday afternoon.  He said he wanted to offer Iran an off-ramp talk "without preconditions," he told reporters. 

U.S. officials said they could see Iranian ballistic missiles movement Tuesday, thanks to U.S. Air Force early warning aircraft, flying radar, circling high overhead in the region.  The suspicious Iranian activity also was monitored from American spy satellites in space, officials said. 

TRUMP SAYS IRAN 'APPEARS TO BE STANDING DOWN,' MISSILE STRIKES RESULTED IN NO CASUALTIES

A senior U.S. defense official involved in crafting the U.S. response ahead of the missile strikes told Fox News that the early warnings also including "layers of surveillance" of satellites that can detect "the second the missile motor sparks."  They said the flying time between Iran and Irbil is between 3 to five minutes. 

According to early damage assessments from the two Iraqi bases, 11 Iranian ballistic missiles -- 10 at al-Asad and one at Irbil -- landed in areas where there were no American troops, thus resulting in no U.S. or coalition casualties, officials said.  Four other Iranian missiles failed to hit their targets. 

It was not immediately clear where in Iran the missiles were launched.  The senior U.S. defense official said the Pentagon believes Iran used decades-old ballistic missile technology and that they were not the most state-of-the-art Iranian missiles. 

The strikes on Tuesday came days after Trump authorized the targeted killing of Gen. Qassem Soleimani, the head of Iran's elite Quds Force, in Baghdad.  Iran had pledged to retaliate. 

CLICK HERE TO GET THE FOX NEWS APP

Trump said Wednesday that Solemani was responsible for the "absolute worst atrocities, trained terrorist armies, fueled bloody civil wars across the region." 

"By removing him, we've sent a powerful message to terrorists, 'If you value your own life, you will not threaten the lives of our people,'" he said, adding that sanctions on Iran will remain and more will be added. " To Iran, we want you to have a future, a great future, one you deserve, prosperity at home and harmony with nations of the world.  The United States is ready to embrace peace with all who seek it." 

Fox News' Jennifer Griffin and the Associated Press contributed to this report.