In a drastic escalation of the U.S.’ generation-long wars in the Middle East, a U.S. strike on Thursday in Baghdad killed Qassem Soleimani, the leader of Iran’s powerful Quds Force and an architect of American agony in Iraq.

The Pentagon confirmed late Thursday that it killed Soleimani “at the direction of the president” and claimed in a statement that “General Soleimani was actively developing plans to attack American diplomats and service members in Iraq and throughout the region.”

It continued: “This strike was aimed at deterring future Iranian attack plans. The United States will continue to take all necessary action to protect our people and our interests wherever they are around the world.”

President Trump tweeted about the situation on Friday morning: “Iran never won a war, but never lost a negotiation!”

Reports from Iraq said Soleimani was killed in a strike that occurred near Baghdad International Airport. The airport, which houses U.S. and allied Iraqi forces, had also come under rocket fire from unknown militants on Thursday.

Killing Soleimani, a senior official of a nation with which the U.S. is not officially at war, is highly likely to prompt reprisal attacks against Americans in Iraq and perhaps elsewhere. In addition to the 5,000 troops in Iraq, there are nearly 10,000 more deployed across the Middle East, including in Saudi Arabia, which is fighting a U.S.-backed proxy war with Iran in Yemen.

The strike on Soleimani came days after supporters of an Iran-backed Iraqi militia, Kataib Hezbollah, besieged the U.S. embassy in Baghdad, itself a reprisal for U.S. strikes on the militia in Iraq and Syria.

Defense Secretary Mark Esper said before the Thursday strike that he anticipated additional attacks by Iranian-backed militias. “And they will likely regret it,” he told reporters. “And we are prepared to exercise self-defense, and we are prepared to deter further bad behavior from these groups, all of which are sponsored and directed and resourced by Iran.”

Soleimani has been a top U.S. adversary for 15 years, when the U.S. invasion and occupation of Iraq became a battlefield for Iranian proxy conflict against an Iran that saw itself encircled by the U.S. on both its western and eastern borders. The U.S. blamed Iran both for a wave of powerful bombs that killed and maimed U.S. servicemembers and for frustrating U.S. plans to turn Iraq into a U.S.-aligned Mideast outpost.

Famously, Soleimani in 2008 texted David Petraeus, then the U.S. military commander in Iraq, to brag that he controlled Iran’s policy in Iraq and was outfoxing the Americans.

But the U.S. had long feared that taking direct military action against Iran would result in an entirely new, devastating war. The Obama administration, seeking to avert escalation, signed a deal with Iran to forestall its development of a nuclear weapon. In Iraq, U.S. and Iranian forces reached an uneasy, unacknowledged alignment of interests when both fought against the so-called Islamic State terror group.

The Trump administration, however, has taken a bellicose posture toward Iran, despite pledging to end U.S.-Mideast entanglements. It canceled the nuclear deal with Iran and, in April, designated the Quds Force a terrorist group.

“I’m more convinced than ever that we have basically lost Iraq,” said one former senior Obama administration official. “I cannot think of any factions that would declare their support for us. That’s new and a part of bad trend.”

The strike in Iraq on Thursday comes after the Trump administration’s years-long “maximum pressure” campaign—a policy to decimate Iran’s economy with sanctions so severe that it forced the country back in line with the nuclear deal. While those sanctions have hit Tehran’s most important financial sectors with force, Iran’s leaders have resisted adhering to America’s demands.

The Iranian presence in Iraq had become the focus of major protests in recent months, which may have emboldened the Trump administration. Secretary of State Mike Pompeo has made that point repeatedly. But the escalating U.S. and also Israeli confrontation with Iran-backed militias may serve to focus Iraqi public outrage on the United States. The U.S. actions are flagrant violations of Iraqi sovereignty, and put in danger the lives of American troops in Iraq who have been there at the invitation of the Iraqi government since 2014 to help in the war against ISIS.

Tensions between the U.S. and Iranian proxies operating in Iraq were boiling hot even before Soleimani was killed on Thursday. Following protests at the U.S. embassy last week, fighters with Kataib Hezbollah and other Iranian-backed groups vowed to continue to encircle American outposts in the country.

“The main problem is we have got enough from America. We don’t want them to be here. They are the source of all the problems—terrorists, internal fights. We don’t want to argue anything with anyone. The only solution is Americans should leave Iraq,” Saad Ali, a 27-year-old fighter from Kataib Hezbollah, said Wednesday. “They killed our brothers who fought ISIS, we won’t let our brothers’ blood be wasted that easy. We won’t leave till the Americans leave our country. We will kick them out from our country.”

Hassam Abbas, a 31-year-old member of Asaib Ahl al-Haq, a Shiite militia in Iraq, said the American troops in Iraq “make a disaster” wherever they go.

“We don’t want them here. They should get out of Iraq as soon as possible, otherwise we have forces and we will fight them all over Iraq,” he said on Wednesday. “We will surround all their bases with protests in the next few days.”

The Iranian-American author and commentator Hooman Majd expected violent retaliation, as he said Soleimani is perceived within Iran as a nationalist figure who has fought in Iran’s wars since the 1980s.

“It’s an incredibly dangerous escalation, not thought through, and certainly the chances of retaliation in places where Iran has the ability to retaliate, such as Iraq, Afghanistan, Lebanon, the Persian Gulf states, would lead one to believe American government officials or soldiers are potentially in danger,” Majd said.

If the president’s supporters share such concerns, they’re keeping them quiet, for now. Even before the Trump administration officially confirmed the death of Soleimani, various officials from the president’s re-election campaign were doing victory laps on social media.

“Alexa, play ‘Another One Bites the Dust,’” tweeted Trump 2020 rapid-response staffer Abigail Marone. The post was retweeted by Team Trump’s principal deputy comms director Erin Perrine. “THIS is what strong foreign policy looks like.”

—with additional reporting by Christopher Dickey and Asawin Suebsaeng