Iraq's parliament called on Sunday for the US and other foreign troops to leave as a backlash grows against the US killing of a top Iranian general, and President Donald Trump doubled down on threats to target Iranian cultural sites if Tehran retaliates.

Deepening a crisis that has heightened fears of a major Middle East conflagration, Iran said it was taking another step back from commitments under a 2015 nuclear deal with six major powers.

Iran's most prominent general, Qassem Soleimani, was killed on Friday in a US drone strike on his convoy at Baghdad airport, an attack that carried US-Iranian hostilities into uncharted waters.

An Iranian government minister denounced Trump as a "terrorist in a suit" after the US president sent a series of Twitter posts on Saturday threatening to hit 52 Iranian sites, including targets important to Iranian culture, if Tehran attacks Americans or US assets to avenge Soleimani's death.

Talking to reporters aboard Air Force One on the way to Washington from Florida on Sunday evening, Trump stood by those comments.

"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 sites? It doesn't work that way," he said.

Democratic critics of the Republican president have said Trump was reckless in authorizing the strike, and some said his comments about targeting cultural sites amounted to threats to commit war crimes. Many asked why Soleimani, long seen as a threat by US authorities, had to be killed now.

Republicans in Congress have generally backed Trump's move.

Iraq parliament
Members of the Iraqi parliament are seen at the parliament in Baghdad.Reuters

Trump also threatened sanctions against Iraq and said that if US troops were required to leave the country, Iraq's government would have to pay Washington for the cost of a "very extraordinarily expensive" airbase there.

He said if Iraq asked US forces to leave on an unfriendly basis, "we will charge them sanctions like they've never seen before ever. It'll make Iranian sanctions look somewhat tame."

The Iraqi parliament passed a resolution calling for an end to all foreign troop presence, reflecting the fears of many in Iraq that Friday's strike could engulf them in another war between two bigger powers long at odds in Iraq and across the region.

While such resolutions are not binding on the government, this one is likely to be heeded: Prime Minister Adel Abdul Mahdi had earlier called on parliament to end foreign troop presence as soon as possible.

Iran and the United States have been competing for clout in Iraq since the US-led invasion in 2003 that toppled dictator Saddam Hussein.

VOTE ON FOREIGN TROOPS

Before Trump's comments to reporters, a State Department spokeswoman said the United States was waiting for clarification of the legal nature and impact of the resolution, and strongly urged Iraqi leaders to reconsider the importance of the two nations' ongoing economic and security relationship.

Some 5,000 US troops remain in Iraq, most in an advisory role.

Abdul Mahdi said that despite the "internal and external difficulties" the country might face, cancelling its request for help from US-led coalition military forces "remains best for Iraq on principle and practically."

He said he had been scheduled to meet Soleimani the day he was killed, and that the general had been due to deliver an Iranian response to a message from Saudi Arabia that Abdul Mahdi had earlier passed to Tehran. Sunni Muslim Saudi Arabia and Shi'ite Iran had been about to "reach a breakthrough over the situation in Iraq and the region", Abdul Mahdi said.

Iranian military leader Qassem Soleimani
Donald Trump ordered killing of powerful Iranian military leader Qassem Soleimani.Twitter

Despite decades of US-Iran enmity, Iranian-backed militia and US troops fought side by side during Iraq's 2014-17 war against Islamic State, their common enemy. Iraqi militia leader Abu Mahdi al-Muhandis was also killed in Friday's strike.

Sunday's parliamentary resolution was passed by overwhelmingly Shi'ite lawmakers, as the special session was boycotted by most Sunni Muslim and Kurdish lawmakers.

One Sunni member of parliament told Reuters both groups feared that kicking out US-led forces would leave Iraq vulnerable to insurgents, undermine security and heighten the power of Iranian-backed Shi'ite militias.

NUCLEAR DEAL

The 'E3' group of countries comprising France, Britain and Germany called on Iran to refrain from any violent action and urged it to go back to respecting arrangements laid out in the 2015 nuclear deal with world powers.

The three nations also reaffirmed their determination to fight Islamic State and called on Iraqi authorities to continue to give the necessary support to the coalition.

It was Trump's withdrawal of the United States from the deal in 2018 and reimposition of sanctions on Iran that touched off a new spiral of tensions after a brief thaw following the accord.

On Sunday, Iran further distanced itself from the agreement, saying it would continue to cooperate with the UN nuclear watchdog but would respect no limits to its uranium enrichment work.

Qasem Soleimani funeral
People attend the funeral procession of Iranian Major-General Qassem Soleimani.Reuters

That meant "there will be no limitations in enrichment capacity, level of enrichment and research and development and ... it will be based on Iran's technical needs," state TV said, quoting a government statement. It said the rollback of its nuclear commitments could be reversed if Washington lifted sanctions on Tehran.

As head of the Revolutionary Guards' Quds Force, Soleimani masterminded Iran's clandestine and military operations abroad, creating an arc of Shi'ite power with the help of proxy militias confronting the regional might of the United States, Israel and Saudi Arabia.

Hundreds of thousands of mourners, many chanting, beating their chests and wailing in grief, turned out across Iran to show their respects after his body was returned to a hero's welcome.