Soleimani, a 62-year-old general who headed the overseas arm of the Revolutionary Guards, was regarded as the second most powerful figure in Iran after Supreme Leader Ayatollah Ali Khamenei.
U.S. Secretary of State Mike Pompeo said that the U.S. airstrike in Baghdad on Friday that killed Qassem Soleimani - who was regarded as the second most powerful figure in Iran after Supreme Leader Ayatollah Ali Khamenei - aimed to disrupt an "imminent attack" that would have endangered U.S. troops in the Middle East.
The overnight attack, authorized by U.S. President Donald Trump, was a dramatic escalation in a "shadow war" in the Middle East between Iran and the United States and American allies, principally Israel and Saudi Arabia.
Democratic called the Republican president reckless and said he had raised the risk of more violence in a dangerous region.
Trump claimed in Palm Beach, Florida that the United States attacked to stop a war, not to start one. He said he does not seek "regime change" in Iran but also stated that Iran's use of proxy fighters in the Middle East must end.
Pompeo declined to give details of the threat, but said in interviews with Fox News and CNN that it was "an intelligence-based assessment" that drove the decision to target Soleimani.
A top U.S. general said the plot by Soleimani could still happen despite his death, and that the U.S. military fully comprehends the strategic consequences of killing him.
U.S. officials said Washington was sending nearly 3,000 more troops to the Middle East, joining roughly 750 sent to Kuwait this week.
The attack also killed top Iraqi militia commander Abu Mahdi al-Muhandis.
In Iraq, many condemned the attacks, criticizing Washington for killing the men on Iraqi soil and possibly plunging the country into another war.
Iraqi Prime Minister Adel Abdul Mahdi said with Friday's attack Washington had breached Iraq's sovereignty and violated a deal for keeping U.S. troops in his country.
Khamenei said harsh revenge awaited the "criminals" who killed Soleimani and his death would redouble resistance against the United States and Israel. He called for three days of national mourning and appointed Soleimani's deputy, Brigadier General Esmail Ghaani, to replace him as Quds Force head.
Iran summoned a Swiss envoy for a second time to reply to a U.S. message, Iranian media said, hours after a Swiss diplomat delivered a U.S. communication over the killing.
The killing was an act of "international terrorism," Foreign Minister Mohammad Javad Zarif said, adding that Iran will launch various legal measures at the international level to hold America to account.
U.S. officials said Soleimani was killed in a drone strike. Iran said he died in an attack by U.S. helicopters.
Israel put its army on high alert and U.S. allies in Europe including Britain, France and Germany voiced concerns.
U.N. Secretary-General Antonio Guterres called for "maximum restraint". Iran's top Arab foe, Saudi Arabia, urged restraint.
Russian Foreign Minister Sergei Lavrov told Pompeo on a phone call that the killing "grossly violates international law and deserves to be condemned," according to a ministry statement.
The U.S. embassy in Baghdad urged American citizens to leave Iraq immediately, and dozens of U.S. citizens working for foreign oil companies in the southern city of Basra heeded the call. Iraqi officials said the evacuations would not affect output and exports.
U.S. authorities said they saw no imminent threats from potential Iranian retaliation, but officials in major cities were on heightened alert.
Chas Freeman, a retired U.S. ambassador, said he could think of no other example of the United States openly killing a senior foreign government official during peacetime. "This is unprecedented," Freeman said.
Former Vice President Joe Biden, a contender in November's U.S. presidential election, called it a reckless move and said Trump had "tossed a stick of dynamite into a tinderbox."
After being briefed by U.S. officials in Washington, House of Representatives Intelligence Committee Chairman Adam Schiff, a democrat, questioned why the Trump administration chose to act against Soleimani now, when previous administrations had decided such a step would increase the risks in the region.
"If the administration has a broader strategy, they have yet to articulate it," Schiff told reporters.
As chief of the Quds Force, the Revolutionary Guards foreign arm, Soleimani had a key role in fighting in Syria and Iraq.
Over two decades he was at the forefront of projecting the Islamic Republic's military influence across the Middle East, acquiring celebrity status at home and abroad. He had survived several assassination attempts by Western, Israeli and Arab agencies over the past two decades.
President Hassan Rouhani said the killing would stiffen Iran's resistance to the United States. The Revolutionary Guards said anti-U.S. forces would exact revenge in the Muslim world.
Hundreds of Iranians marched toward Khamenei's compound in Tehran to convey their condolences.
Soleimani became head of the Quds Force in 1998, after which he strengthened Iran's ties with Hezbollah in Lebanon, Syria's government and Shi’ite militia groups in Iraq.