Iran launched missile attacks on United States-led forces in Iraq in the early hours of Wednesday in retaliation for the US drone strike on Iranian commander Qassem Soleimani whose killing has raised fears of a wider war in the Middle East.

Tehran fired more than a dozen ballistic missiles from Iranian territory against at least two Iraqi military bases hosting US-led coalition personnel at about 1:30am local time, the US military said.

US-Iran conflict: Before and after the killing of Gen Soleimani

Iraq’s military said 22 missiles were launched on the Ain al-Asad air base in western Anbar province and a base in the Iraqi Kurdish capital Erbil, causing no casualties among Iraqi forces. According to Iranian state television, 80 "American terrorists" were killed in the missile attack, adding that none of the missiles were intercepted.

Key developments

80 "American terrorists" killed in attack, says Iran's state TV

US not aware of any casualties, situation still being assessed

Khamenei terms missile attacks as "slap" on US' face

Rouhani says Iran will respond to US by "cutting off your leg" in the region

Trump to make a statement tomorrow

Iranian officials say strikes “concluded” Iran's response to Soleimani's killing

Hours after the attack, Iranian Supreme Leader Ayatollah Ali Khamenei in an address to the nation said: "We slapped them (Americans) on the face last night." He added that military action was not enough.

Khamenei added that the "corrupt presence of the US in the region should come to an end", saying it has caused war, division, and destruction.

Iran's supreme leader also invoked the virtues of the slain commander, Gen Soleimani, saying he was a "great, brave warrior" and dear friend to us.

Iranian President Hassan Rouhani too addressed the nation after the attacks and said that the US may have "cut off Soleimani's arm" but Iran will respond by "cutting off your leg" in the region, Fars news agency reported.

Iran Foreign Minister Javad Zarif, while talking to state TV, said that the attacks were "legitimate self-defence".

"Our action was a legitimate self-defence and the United States should avoid assessing it based on illusions," Zarif said.

State TV, citing a senior Revolutionary Guards source, also said Iran had 100 other targets in the region in its sights if Washington took any retaliatory measures. It also said US helicopters and military equipment were “severely damaged”.

It was Iran’s most direct assault on America since the 1979 seizing of the US Embassy in Tehran. US and Iraqi officials said there were no immediate reports of casualties, though buildings were still being searched.

US President Donald Trump said in a tweet that an assessment of casualties and damage from the strikes was under way and that he would make a statement in the morning.

"All is well!" Trump said in the Twitter post. "So far, so good! We have the most powerful and well equipped military anywhere in the world, by far!"

Meanwhile, Iran's Foreign Minister Mohammad Javad Zarif said Iran is not seeking escalation or war, adding that Tehran would defend itself against any aggression.

"Iran took and concluded proportionate measures in self-defence under Article 51 of UN Charter targeting [the] base from which cowardly armed attack against our citizens and senior officials were launched," he said.

'Avenging' Soleimani

Iran's Islamic Revolutionary Guards Corps confirmed they fired the missiles to retaliate for last week's killing of Qasem Soleimani, according to a statement on state TV.

The statement advised the United States to withdraw its troops from the region to prevent more deaths and warned US allies including Israel not to allow attacks from their territories.

Pentagon spokesman Jonathan Hoffman said in a statement that the bases targeted were al-Asad air base and another facility in Erbil, Iraq.

"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."

Trump, who visited the al-Asad air base in December 2018, was briefed on reports of the attack and was monitoring the situation, White House spokeswoman Stephanie Grisham said.

Democrats in the US Congress and some of the party's presidential contenders warned about the escalating conflict.

"Closely monitoring the situation following bombings targeting US troops in Iraq," US House of Representatives Speaker Nancy Pelosi said on Twitter.

US Secretary of State Mike Pompeo and US Defence Secretary Mark Esper arrived at the White House following news of the attack.

Hours earlier on Tuesday, Esper said the United States should anticipate retaliation from Iran over Friday's killing in Iraq of Soleimani, commander of the elite Quds Force.

"I think we should expect that they will retaliate in some way, shape or form," he told a news briefing at the Pentagon, adding that such retaliation could be through Iran-backed proxy groups outside of Iran or "by their own hand".

"We're prepared for any contingency. And then we will respond appropriately to whatever they do."

Military jets could be seen flying over the Iraqi capital hours after the missile attack.

AFP's correspondents saw jets cutting through the clouds over Baghdad but could not immediately identify the planes.

Stock markets in Asia fell sharply on news of the rocket attack, while investor safe havens including the Japanese yen and gold shot higher. US crude prices surged almost 5 per cent on worries any conflict could cut oil supplies.

The US Federal Aviation Administration said it would prohibit US civil aviation operators from operating in the airspace over Iraq, Iran, the Gulf and the Gulf of Oman. Singapore Airlines had already diverted all flight routes from Iranian airspace.

Soleimani, a pivotal figure in orchestrating Iran's long-standing campaign to drive US forces out of Iraq, was also responsible for building up Tehran's network of proxy armies across the Middle East.

Also read: Qasem Soleimani — the general who became an Iran icon by targeting US

He was a national hero to many Iranians, whether supporters of the clerical leadership or not, but viewed as a dangerous villain by Western governments opposed to Iran's arc of influence running across the Levant and into the Gulf region.

'We will take revenge'

A senior Iranian official said on Tuesday that Tehran was considering several scenarios to avenge Soleimani's death. Other senior figures have said the Islamic Republic would match the scale of the killing when it responds, but that it would choose the time and place.

"We will take revenge, a hard and definitive revenge," the head of Iran's Revolutionary Guards, General Hossein Salami, told throngs who crowded the streets for Soleimani's funeral on Tuesday in Kerman, his hometown in southeastern Iran.

Soleimani's burial went ahead after several hours of delay following a stampede that killed at least 56 people and injured more than 210, according an emergency official quoted by Iran's semi-official Fars news agency.

Soleimani's body had been taken to holy Shia cities in Iraq and Iran, as well as the Iranian capital, Tehran, before arriving to be buried in the city cemetery's “martyrs section”, according to the semi-official news agency ISNA.

In each place, huge numbers of people filled thoroughfares, chanting: "Death to America" and weeping with emotion. Supreme Leader Khamenei wept as he led prayers in Tehran.

Prompted by the strong public backlash over Soleimani's killing on Iraqi soil, lawmakers in Iraq voted on Sunday to demand a removal of all foreign forces from the country.

More than 5,000 US troops remain in Iraq along with other foreign forces as part of a coalition that has trained and backed up Iraqi security forces against the threat of Islamic State militants.

A Nato official told Reuters it would move some of its several hundred trainers out of Iraq. Canada said on Tuesday some of its 500 Iraq-based forces would be temporarily moved to Kuwait for safety reasons.

French President Emmanuel Macron, in a phone call on Tuesday to Iran's president, Rouhani, urged Tehran to avoid any actions that could worsen regional tensions.

US officials have said Soleimani was killed because of solid intelligence indicating forces under his command planned attacks on US targets in the region, although they have provided no evidence.

Ali Shamkhani, secretary of Iran's Supreme National Security Council, said 13 "revenge scenarios" were being considered, Fars news agency reported. Even the weakest option would prove "a historic nightmare for the Americans", he said.