The US military killed Soleimani on Friday in an air strike outside Baghdad international airport that shocked the Islamic republic and sparked fears of a new war in the Middle East.

The Islamic Revolutionary Guard Corps confirmed the commander of its Quds Force foreign operations arm had been killed on Friday by US forces in an air strike on Baghdad international airport.

Iran's supreme leader Ayatollah Ali Khamenei swiftly promised "severe revenge" and declared three days of mourning.

Soleimani's body was expected to arrive in Tehran on Saturday night before being taken to the Shiite holy city of Mashhad the next day for a ceremony to be held next to Imam Reza's shrine, a statement posted on the Guards website late Friday said.

"A ceremony will next be held in Tehran on Monday morning, and then the pure body of this soldier of the people and the nation will be buried in Kerman on Tuesday morning," it added.

A group of students also announced they would hold a vigil for Soleimani at Tehran University on Saturday before going to Tehran's Mehrabad airport for the arrival of his remains.

The general, who died aged 62, was one of Iran's most popular public figures.

After serving in the 1980-88 Iran-Iraq war, Soleimani quickly rose through the ranks of the Guards to become commander of the Quds Force.

In recent years he became an unlikely celebrity in Iran and had a huge following on Instagram.

Tens of thousands of people took to the streets of Tehran and other cities across Iran on Friday to protest the US attack.

Khamenei and Iran's President Hassan Rouhani paid separate visits to Soleimani's family at their home on Friday to offer them their condolences over his death.

amh/dv/kir