"We follow with deep concern recent developments in Iraq and call for maximum restraint to avoid escalation with serious consequences for regional and global peace, stability and security,” said a message posted on the official Twitter account of the Ministry of Foreign Affairs in the wake of the attack.

Qassem Soleimani, commander of the elite force of Iran’s Revolutionary Guard, the Al-Quds brigade, died on Friday in a US drone attack in Baghdad, along with Abu Mehdi al-Muhandis, the number two in the coalition of pro-Iranian paramilitary groups in Iraq, Hachd al-Chaab, and six other people.

Iran's supreme leader, Ayatollah Ali Khamenei, has promised to avenge Soleimani's death and the country’s Supreme National Security Council said revenge will take place "in the right place and at the right time."

For both his supporters and his critics, Soleimani, who played an important role in fighting the jihadists of Islamic State, was widely seen as key to coordinating Iran’s influence in the Middle East. In particular, he reinforced Tehran's diplomatic weight in Iraq and Syria, two countries where the US is involved militarily.

The dispute between the United States and Iran is longstanding and tensions have been rising since the US president, Donald Trump, unilaterally pulled his country out of the international agreement on Iran’s nuclear programme that was signed in 2015 and ordered the restoration of sanctions that have been devastating to the country’s economy.

The United Nations secretary-general, António Guterres, on Friday warned against “another war in the Gulf" following the US attack, and called on leaders to show “maximum restraint" at this time of tension.