President Donald Trump has defended his decision to launch a US airstrike which killed Iran's most powerful military commander, General Qasem Soleimani in Iraq.

In his first comments since the early Friday strike against the head of Iran's elite Quds Force, Trump said Soleimani was responsible for killing and wounding "thousands" of Americans and many more in the region.

"He was directly and indirectly responsible for the death of millions of people, including the recent large number of PROTESTERS killed in Iran itself," Trump added.

"He should have been taken out many years ago".

The Pentagon has claimed responsibility for the strike, as ordered by the President. (9News)

The strike marked a major escalation in the conflict between Washington and Iran, as the latter vowed "harsh retaliation" for the killing of the senior military leader.

The two nations have faced repeated crises since Trump withdrew from the 2015 nuclear deal and imposed crippling sanctions, reversing the diplomatic overtures reached between his predecessor Barack Obama and the Iranian regime.

He also said Soleimani "was both hated and feared" by people in his own country.

Four people have been killed in a rocket attack on Baghdad airport. (Twitter)

The US has urged its citizens to leave Iraq "immediately" as fears mounted that the strike and any retaliation by Iran could ignite a conflict that engulfs the region.

US Secretary of State Mike Pompeo also claimed on Friday that the airstrike aimed to disrupt an "imminent attack" from Iran that would have endangered Americans in the Middle East.

Pompeo, in interviews on Fox News and CNN, declined to discuss many details of the alleged threat but said it was "an intelligence-based assessment" that drove the US decision to target Qassem Soleimani, the commander of Iran's elite Quds Force.

The head of the Revolutionary Guard's foreign wing, or Quds Force, Gen. Qassim Soleimani died in the attack. (AP/AAP)

"He was actively plotting in the region to take actions - a big action as he described it -- that would have put dozens if not hundreds of American lives at risk. We know it was imminent," Pompeo told CNN, echoing an earlier Pentagon statement on Thursday.

"These were threats that were located in the region," Pompeo added.

"Last night was the time that we needed to strike to make sure that this imminent attack ... was disrupted."