Iranians today raised the blood-red 'flags of revenge', vowing to retaliate after the US killed general Qassem Soleimani in an airstrike in Baghdad.

Iranian state TV broadcast the flag being hoisted over the minarets at the revered Jamkaran Mosque in the holy city of Qom on Saturday.

In Shia Islam the red flags, which have also been flown at demonstrations in Tehran, symbolize blood spilled unjustly and serve as a call to avenge the person who is slain.

It comes as Iran's supreme leader Ayatollah Ali Khamanei and President Hassan Rouhani consoled Soleimani's distraught children at his family home last night, reassuring them the commander would be avenged.

As the flag was raised the speakers called, 'O Allah, hasten your custodian reappearance,' a reference to the end-times reappearance of the Mahdi, a divine bringer of justice

As the flag was raised in Qom, the mosque speakers called, 'O Allah, hasten your custodian reappearance,' a reference to the end-times reappearance of the Mahdi.

In Shia Islam, the faith of Iran, the Mahdi is a divine figure who will appear to bring a Day of Judgement and rid the world of evil.

Soleimani, 62, was killed in the early hours of Friday, local time, outside Baghdad's International Airport in an airstrike ordered by President Donald Trump

Last night Khamanei and Rouhani consoled Soleimani's family.

'Who is going to avenge my father's blood?' One of the commander's daughters asked.

In response, Rouhani promised her that 'everyone will take revenge' and assured her as she wept, 'we will, we will avenge his blood, you don't worry.'

'The Americans did not realize what a grave mistake they have made. They will suffer the consequences of such criminal measure not only today, but also throughout the years to come,' Rouhani said.

'This crime committed by the US will go down in history as one of their unforgettable crimes against the Iranian nation.'

Soleimani, 62, was killed in the early hours of Friday, local time, outside Baghdad's International Airport in an airstrike ordered by President Donald Trump.

Hours after the attack, Trump said that he ordered the killing of Soleimani to prevent war, adding that the commander was plotting 'imminent and sinister' attacks against Americans.

President Rouhani (right) speaking with General Soleimani's daughters (left) on Saturday

Ayatolla Khameneireleased a series of tweets on Saturday, recounting his conversations with Soleimani's family during his visit on Friday

Iran's Supreme Leader Ayatolla Ali Khamenei (pictured) comforted a member of Soleimani's family during a visit to the family's home on Friday evening

The general was the architect of Iran's shadow warfare and military expansion in the Middle East and was targeted specifically because he was actively developing plans to kill members of the U.S. military and diplomats in the region.

Gholamali Abuhamzeh, the Revolutionary Guards commander from Soleimani's hometown Kerman, said Tehran would punish Americans 'wherever they are in reach', and raised the prospect of possible attacks on ships in the Gulf.

'The Strait of Hormuz is a vital point for the West and a large number of American destroyers and warships cross there,' Abuhamzeh was quoted as saying on Friday evening by the semi-official news agency Tasnim.

'Vital American targets in the region have long since been identified by Iran ... Some 35 U.S. targets in the region as well as Tel Aviv are within our reach,' he said, referring to Israel's largest city.

Protesters demonstrate over the U.S. airstrike in Iraq that killed Iranian Revolutionary Guard Gen. Qassem Soleimani in Tehran, Iran, Saturday. Red flags in Shia tradition symbolize both blood spilled unjustly and serve as a call to avenge a person who is slain

Thousands pack the streets in front of Imam Jafar Sadegh Mosque in downtown Tehran on Saturday afternoon many flying the red flag

Thousands of mourners took to the streets of Tehran today where the red flag was also seen fluttering before a downtown mosque in the Iranian capital.

Meanwhile in Baghdad, shouts of 'Death to America' filled the air as tens of thousands of people marched to mourn Soleimani and Iraqi militia leader Abu Mahdi al-Muhandis, who was also killed in the US strike.

A PMF-organised procession carrying the bodies of Soleimani, Muhandis and other Iraqis killed in the US strike took place in the city's heavily fortified Green Zone.

Mourners included many militiamen in uniform for whom Muhandis and Soleimani were heroes.

They carried portraits of both men and plastered them on walls and armoured personnel carriers in the procession.

According to local reports it is the first time in the Qom mosque's history - a holy site since the Middle Ages - that the red flag has been hoisted over the building

Prime Minister Adel Abdul Mahdi and Iraqi militia commander Hadi al-Amiri, a close Iran ally and the top candidate to succeed Muhandis, attended.

Mourners later brought the bodies by car to the Shi'ite holy city of Kerbala south of Baghdad.

The procession was to end in Najaf, another sacred Shia city where Muhandis and the other Iraqis killed will be laid to rest.

Soleimani's body will be transferred on Saturday to the southwestern Iranian province of Khuzestan that borders Iraq.

On Sunday it will be taken to the Shia holy city of Mashhad in Iran's northeast and from there to Tehran and his hometown Kerman in the southeast for burial on Tuesday, state media said.

