A U.S. airstrike in Iraq ordered by President Donald Trump killed one of Iran’s most powerful generals, sending global markets tumbling on fears of a deepening conflict in the Middle East.

Qassem Soleimani, who led proxy militias that extended Iran’s power across the region, was killed in a strike in Baghdad authorized by Trump, the Defense Department said in a statement late Thursday night. Trump had no immediate comment, but tweeted the image of an American flag. Iran’s Supreme Leader threatened “severe retaliation.”

Oil futures in London and New York surged by more than 4%, gold extended gains, Treasuries advanced and stock futures slid, ending the bullish mood that had pushed the S&P 500 to a record high on Thursday.

“At the direction of the president, the U.S. military has taken decisive defensive action to protect U.S. personnel abroad by killing” Soleimani, the department said. “General Soleimani was actively developing plans to attack American diplomats and service members in Iraq and throughout the region.”

The death of Soleimani, who led the Revolutionary Guards’ Quds force, prompted oil to surge and U.S. stock futures to fall amid heightened fears that rising tensions between the U.S. and Iran may lead to an armed confrontation that could easily pull in other countries. The pressures, which have been building for months, have been complicated by widespread protests in Iraq and Iran.

Iran’s top leaders all condemned the attack and vowed to hit back. Supreme Leader Ayatollah Ali Khamenei vowed to avenge Soleimani’s killers, according to a statement. The state-run Tasnim news agency said the government declared three days of mourning.

“A severe retaliation awaits murderers who have the blood of Soleimani and that of other martyrs on their wicked hands from last night’s incident,” Khamenei said.

President Hassan Rouhani also said Iran “will take revenge,” while Foreign Minister Javad Zarif denounced the killing on Twitter as “an act of international terrorism” and said the U.S. “bears responsibility for all consequences of its rogue adventurism.”

“Nowhere will be safe for Americans from now on after Soleimani assassination,” Heshmatollah Falahatpisheh, a member of the Iranian parliament’s national security commission, was quoted as saying by ICANA, the legislative body’s official news service.

U.S. equity futures fell and Asian stocks reversed earlier gains as the news broke. Treasury futures climbed with the yen as investors sought safer haven assets. Futures on the S&P 500 dropped 0.9% as of 7:49 a.m. in London on Friday. Brent crude surged 2.9%.

Soleimani was hit in a U.S. drone strike near Baghdad International Airport, according to a U.S. official. Details remained unclear, but a person familiar with the developments said an Iraqi militia leader, Abu Mahdi al-Muhandis, was also killed.

The Iranian regime will be under “strong pressure” to strike back, said Paul Pillar, a former U.S. Central Intelligence Agency officer and a non-resident senior fellow at Georgetown University in Washington. “Many Iranians will regard this event the same way Americans would regard, say, the assassination of one of the best known and most admired U.S. military leaders. The potential for escalation has suddenly gone up.”

Iraqi forces enhanced security around the U.S. embassy in Baghdad after the airstrike, Iraq’s al-Sumaria news reported, citing a security official. Iran summoned the Swiss envoy in Tehran, who helps look after U.S. interests in the country, in response to the killing, according to foreign ministry spokesman Abbas Mousavi.

Soleimani, a veteran of the Iran-Iraq war, was a household name in Iran where he’s celebrated for helping to defeat Islamic State in Iraq and Syria and countering U.S. influence. He had been sanctioned by the U.S. since 2007 and last May Washington designated the Revolutionary Guards Corp in its entirety a foreign terrorist organization, the first time the label has been applied to an official state institution or a country’s security forces.

The assault in Baghdad marked the latest in a series of violent episodes that have strained already hostile relations between Iran and the U.S. that began last week when an American contractor was killed in a rocket attack on an Iraqi military base in Kirkuk. The death of the contractor led to a rare, direct American assault on an Iran-backed militia in Iraq. That, in turn, prompted an attack on the U.S. embassy in Baghdad.

Trump had tweeted a warning of dire consequences for Iranian aggression: “They will pay a very BIG PRICE! This is not a Warning, it is a Threat. Happy New Year!”

The killing of such a prominent member of the Iranian hierarchy was unexpected, and drew quick reactions from U.S. lawmakers and Democratic presidential candidates.

Congressional Reaction

Former Vice President Joe Biden, a Democratic presidential candidate, said in a statement that while “no American will mourn” Soleimani’s passing, Trump “just tossed a stick of dynamite into a tinderbox, and he owes the American people an explanation.” Senator Elizabeth Warren called the move “reckless,” while her colleague Bernie Sanders said it put the U.S. on a path to another endless war.

Republican Senator Marco Rubio of Florida said Iran was “entirely to blame for bringing about the dangerous moment now before us.” Lindsey Graham, a Republican senator from South Carolina, praised Trump’s move and said “the price of killing and injuring Americans has just gone up drastically.”

Outside the U.S. government and political arenas, the reaction also wavered between a sense of justification and apprehension over Soleimani’s killing.

‘Worst Nightmare’

Kamran Bokhari, founding director of the Center for Global Policy in Washington, warned that things “could get ugly.” Mark Dubowitz, the chief executive of the Washington-based Foundation for Defense of Democracies, said “the regime in Iran is now facing their worst nightmare: a U.S. president willing to escalate using all instruments of national power.”

Earlier Thursday, U.S. Defense Secretary Mark Esper told reporters at the Pentagon that the American military was moving from responding to Iranian-backed attacks to anticipating them.

“There are some indications out there that they may be planning additional attacks. That’s nothing new,” Esper said. “If that happens, then we will act and, by the way, if we get word of an attack of some kind of indication, we would take pre-emptive action as well to protect American forces, American lives. The game has changed.”

With assistance from Glen Carey and Tony Capaccio.

More must-read stories from Fortune:

2020 Crystal Ball: Predictions for the economy, politics, technology, and more
—Climate change is hitting the insurance industry hard: How Swiss Re is adapting
Russia and China have built a new gas pipeline that has everything—except profit
—Innovative tech offers a solution to aircraft pollution
—The Future 50 sustainability all stars
Subscribe to The Loop, a weekly look at the revolutions in energy, tech, and sustainability.