Iran said early on Wednesday that it had fired more than a dozen rockets at two military bases in Iraq hosting American troops amid escalating tensions between Tehran and Washington.

The missiles hit two bases Ain al-Asad in Anbar province and a facility in Erbil

Iran's Islamic Revolutionary Guard Corps said it conducted the operation at the same early morning hour that the United States killed Quds Force commander Qassem Soleimani on Friday.

Iran has promised to take revenge against the US following the killing of Soleimani.

The general was buried early on Wednesday in his hometown of Kerman, after a deadly stampede at his funeral procession on Tuesday. People across Iran turned out to pay their respects at funeral processions that took place during three days of official mourning.

According to Iran's Fars news agency, Fateh-313 missiles hit Ain al-Asad airbase, which is located 233km (144 miles) west of Baghdad.

An aerial view of Ain al-Asad airbase located in the western Anbar desert west of Baghdad [File: Nasser Nasser/AP]

The Fateh-313 surface-to-surface missile was launched in August 2015 and has a range of 500km (310 miles).

According to the US Central Command, which oversees the US military in the region, 15 missiles were fired, with 10 hitting the Asad base in Anbar, and one at a location near Erbil airport. Four of the missiles reportedly failed.

The Fateh-313 surface-to-surface missile was launched in August 2015 and has a range of 500km (310 miles) [Getty]

Ain al-Asad was the second largest American airbase in Iraq established during the US occupation of the country between 2003 and 2011.

The airbase hosted President Trump during the Christmas holidays in 2018. The visit was Trump’s first journey to a conflict zone since taking office in January 2017.

In 2016, the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) also launched attacks at the base, which then housed several hundred US troops and advisers training the Iraqi army after the US withdrawal in 2011.

Last month, five rockets landed on the air base but did not cause any casualties.

Aside from US and Iraqi forces, the airbase has also hosted US-led coalition partners Denmark.

On Wednesday, Copenhagen said no Danish soldiers were injured or killed in Wednesday's missile strike on the airbase.

Denmark has about 130 soldiers at the base as part of the international coalition fighting ISIL.

President Donald Trump speaks at the Ain al-Asad airbase in Iraq during a visit in 2016 [File: Andrew Harnik/AP Photo]

The second US base in Erbil has not been unnamed, but it is close to the airport in the semi-autonomous Kurdish region.

At its peak, there were an estimated 150,000 American troops stationed in Iraq. Most of them left in 2011.

In 2016, following the advance of ISIL, the number of US troops increased once again to 5,000, with an additional 1,000 more repositioned from Syria, bringing the total to about 6,000 as of October 2019.

Then following the attack on the US embassy in Baghdad on New Year's Eve, US President Donald Trump ordered the immediate deployment of an additional 750 troops to Iraq to secure the diplomatic compound.

In recent days, an additional 3,000 troops were deployed to the Middle East, but it is unknown how many of them were sent directly to Iraq.