Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

U.S. forces at Iraqi bases most likely had some warning before missiles launched by Iran struck Wednesday morning local time, thanks to a facility devoted to detecting and providing alerts about launches anywhere in the world, according to public documents and a former senior intelligence official.

Iran launched more than a dozen ballistic missiles at two bases hosting U.S. military and coalition forces in Iraq, the Defense Department said. The targeted bases, at Ain al-Asad and Irbil, had been on high alert, officials said.

"We are working on initial battle damage assessments," the Pentagon said in a statement.

Full coverage of the crisis with Iran

There was no initial word of deaths or injuries. President Donald Trump tweeted "All is well!" and said an assessment of casualties and damages was taking place. "So far, so good!" he said.

He said he would make a statement Wednesday morning.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

U.S. forces were bunkered down as the situation was being assessed, and the biggest priority was force protection, a U.S. official said Tuesday night.

The Iranian launches came less than a week after the United States killed Iranian Maj. Gen. Qassem Soleimani, commander of its Quds Force, in an airstrike in Iraq.

The Pentagon has described that strike, which was conducted at Trump's direction, as a "defensive action" saying Soleimani "was actively developing plans to attack American diplomats and service members in Iraq and throughout the region."

Download the NBC News app for breaking news and full coverage of the Iran crisis

The National Security Agency maintains a special, little-discussed facility at Fort Meade, Maryland, devoted to detecting missile launches.

The Defense Special Missile and Aerospace Center, known as DEFSMAC, harnesses a network of satellites, radar and other systems to detect the heat signatures and other telltale signs of missile launches in real time.

The facility has evolved since it was created during the Cold War, and it detected Iraqi Scud launches during the first Persian Gulf War.

Weapons experts, including Jeffrey Lewis of the Middlebury Institute of International Studies at Monterey in California, said he believed at least some of the missiles used in the attack were Qiam 1 missiles.

Those are liquid-fueled, short-range Scud variants that have guidance systems, according to the website of the Center for Strategic and International Studies' Missile Defense Project.

Iran used the Qiam-1 against the Islamic State militant group in Syria in June 2017, according to the center.

Lewis said in an email that other missiles used in Wednesday's attack were likely Fateh-110s, which the Missile Defense Project describes as short-range, solid-propellant ballistic missiles.