Iran has threatened to bomb Israel and Dubai if the United States retaliates for its ballistic missile strike at two Iraqi bases housing US troops.

Tehran fired more than a dozen ballistic missiles at two Iraqi bases housing American troops in a revenge attack for the US drone strike that killed top Iranian general Qassem Soleimani on Friday.

The Ayn al Asad airbase in western Iraq that was visited by Donald Trump in December 2018 and the Erbil base in Iraqi Kurdistan were both struck by the missiles on Tuesday at about 5.30pm.

Iran's Revolutionary Guard warned the US and its regional allies against retaliating over the missile attack.

The Guard issued the warning via a statement carried by Iran's state-run IRNA news agency.

'We are warning all American allies, who gave their bases to its terrorist army, that any territory that is the starting point of aggressive acts against Iran will be targeted,' The Guard said.

Another television channel of the Guard also threatened to bomb Dubai and Haifa in Israel.

Iran has fired more than a dozen ballistic missiles at two Iraqi bases housing American troops in a revenge attack for the U.S. drone strike that killed a top Iranian general

Iran's Revolutionary Guard (pictured is Ayatollah Ali Khamenei) threatened to bomb Dubai and Israel if the US retaliate over the strikes

Iranian state TV said the attack was in revenge for the U.S. killing of Revolutionary Guard Gen. Qassem Soleimani, whose funeral procession Tuesday in his hometown of Kerman prompted angry calls to avenge his death.

The Pentagon says the missiles were 'clearly launched from Iran' to target U.S. military and coalition forces in Iraq.

President Donald Trump has been briefed on the attacks and Defense Secretary Mark Esper and Secretary of State Mike Pompeo were spotted arriving at the White House soon after news of the strikes broke.

The rockets used in the attack, according to Iranian TV, were Fatteh-110 ballistic missiles, which have a range of 186 miles or 300km.

The Iranian air force has since deployed multiple fighter jets to patrol it airspace, according to reports - as Iran warned the U.S. and its allies in the region not to retaliate.

Soleimani's killing and Iran's missile strikes also marked the first time in recent years that Washington and Tehran have attacked each other directly rather than through proxies in the region.

The Ayn al Asad airbase in western Iraq that was visited by Donald Trump in December 2018 and the Erbil base in Iraqi Kurdistan were both struck by the missiles on Tuesday at about 5.30pm (EST)

It raised the chances of open conflict erupting between the two nations, which have been foes since the days immediately following Iran's 1979 Islamic Revolution.

After the strikes, a former Iranian nuclear negotiator posted a picture of the Islamic Republic's flag on Twitter, appearing to mimic Trump who posted an American flag following the killing of Soleimani and others Friday in a drone strike in Baghdad.

Ain al-Asad air base was first used by American forces after the 2003 U.S.-led invasion that toppled dictator Saddam Hussein, and later saw American troops stationed there amid the fight against the Islamic State group in Iraq and Syria. It houses about 1,500 U.S. and coalition forces.

About 70 Norwegian troops also were on the air base but no injuries were reported, Brynjar Stordal, a spokesperson for the Norwegian Armed Forces told The Associated Press.

State TV said the operation's name was 'Martyr Soleimani'.

It said the Guard's aerospace division that controls Iran's missile program launched the attack. Iran said it would release more information later.

Wednesday's revenge attack came a mere few hours after crowds in Iran mourned Soleimani and as the U.S. continued to reinforce its own positions in the region and warned of an unspecified threat to shipping from Iran in the region's waterways, crucial routes for global energy supplies.