Iran launched more than a dozen ballistic missiles against US military and coalition forces in Iraq on Tuesday night, the Pentagon confirmed.

“It is clear that these missiles were launched from Iran and targeted at least two Iraqi military bases hosting US military and coalition personnel at Al-Assad and Irbil,” it said in a statement.

“We are working on initial battle damage assessments. In recent days and in response to Iranian threats and actions, the Department of Defense has taken all appropriate measures to safeguard our personnel and partners. These bases have been on high alert due to indications that the Iranian regime planned to attack our forces and interests in the region,” said the Pentagon statement.

“As we evaluate the situation and our response, we will take all necessary measures to protect and defend US personnel, partners, and allies in the region.”

Iran state TV said that Tehran launched “tens” of surface-to-surface missiles at the Ain Assad air base which houses US troops in Iraq.

State TV described the attack as Tehran’s revenge operation over the killing of Gen. Qassem Soleimani, head of the Quds Force of the Iranian Revolutionary Guard.

The network said the operation’s name was “Marytr Soleimani” and added the Guard’s aerospace division, which controls Iran’s missile program, launched the attack.

The Revolutionary Guards warned the United States and its allies in the area against responding to the missile attack. They threatened that "US allies in the region would be attacked if the US uses them for attacks against Tehran."

A US defense official quoted by the LA Times said Iran launched 15 missiles, of which 11 hit their targets and four failed in flight.

There were no reports so far of US casualties in the attack, said the official who was not authorized to speak on the record.

Ten of the missiles hit the al-Assad Air Base in Iraq’s western Anbar province. US radar was able to track the missiles in flight and, as a result, personnel at the base were able to take cover before they were hit. The US made no effort to intercept the missiles, the official said.

One missile hit the Combined Joint Operations Center in Irbil, where the US trains Iraqi Kurdish fighters and also runs a large air operations control center covering northern Iraq and parts of Syria.

The official said that the US Central Command was aware of reports of Iraqi casualties in Irbil but that those remained unconfirmed.

The White House said on Tuesday night, "We are aware of the reports of attacks on US facilities in Iraq. The President has been briefed and is monitoring the situation closely and consulting with his national security team."

US President Donald Trump commented on Twitter on the Iranian attack and wrote, "All is well! Missiles launched from Iran at two military bases located in Iraq. Assessment of casualties & damages taking place now. So far, so good! We have the most powerful and well equipped military anywhere in the world, by far! I will be making a statement tomorrow morning."

Ain Assad air base is located in Iraq’s western Anbar province. It was first used by American forces after the 2003 US-led invasion that former Iraqi leader dictator Saddam Hussein. It later saw American troops stationed there amid the fight against the Islamic State (ISIS) organization.

The Iranian attack follows several days of back-and-forth threats between the US and Iran following Soleimani’s death.

Soleimani’s successor, Brig. Gen. Esmail Ghaani, threatened the US hours after the air strike which killed Soleimani, saying, “Everyone should be patient a little to see the bodies of American soldiers all over the Middle East.”

On Saturday, Trump threatened to attack 52 Iranian sites, including sites that are important to Iranian culture, if the Islamic Republic strikes any Americans or American assets.

On Sunday, Trump doubled down on his threat and asserted that cultural sites in Iran are appropriate sites for retaliation.

“They’re allowed to kill our people. They’re allowed to torture and maim our people. they’re allowed to use roadside bombs and blow up our people. And we’re not allowed to touch their cultural site? It doesn’t work that way," he told reporters.

On Monday, Iranian President Hassan Rouhani responded to Trump’s threats and said nobody should threaten his country.