Dozens of mourners died Tuesday in a stampede at a massive funeral procession for a top Iranian general killed in a U.S. airstrike last week, local media reported.

State-run Press TV said that at least 40 mourners died and as many as 213 were taken to hospital due to injuries caused by overcrowding.

The stampede happened as the body of Lt. Gen. Qassem Soleimani, commander of the Revolutionary Guard's expeditionary Quds force, was being carried through the streets of Kerman, his hometown in southeastern Iran.

(Thousands of Iranian mourners gathered in Tehran during the funeral of Iranian Revolutionary Guards Commander Qassem Soleimani)

The procession, which began at the city's Azadi Square, was initially scheduled to culminate in a burial service at a martyrs' cemetery, but the ritual had to be postponed due to the overcrowding.

Massive processions also took place in such cities as Tehran, Ahvaz, Mashhad and Qom, local media said.

U.S. President Donald Trump ordered the attack on Soleimani's motorcade upon his arrival in Baghdad last Friday at the invitation of Iraq's government, which has condemned it as a violation of Iraqi sovereignty.

The airstrike also killed Abu Mahdi al-Muhandis, the second-in-command of Iraq's Popular Mobilization Units, as well as eight other Iranians and Iraqis.

Iranian Supreme Leader Ayatollah Ali Khamenei, in a message last Friday, swore "harsh revenge" against the United States.

The semiofficial Fars news agency quoted Maj. Gen. Hossein Salami, the commander of the Revolutionary Guard, as telling crowds Tuesday in Kerman, "We will take revenge; a revenge that will be tough, strong, decisive and finishing and will make them regret."

Foreign Minister Mohammad Javad Zarif, in a speech at a forum in Tehran, said, "The U.S. will receive the definitive resolute response to its brazen, criminal act in a place and at a time it hurts most."

"The United States' terroristic assassination of one of the Iranian top military commanders has...opened the gates to an ugly course of action which might, sooner or later, come to haunt itself across the globe."

Related coverage:

Iran fires missiles against Iraqi bases hosting U.S. troops: Pentagon

U.N. warns of highest tensions after U.S. kills Iranian commander

U.S. airstrike kills Iranian commander in Baghdad