The Pentagon launched an airstrike Thursday night that killed a powerful Iranian military leader, Gen. Qasem Soleimani, at Baghdad’s international airport.

The Defense Department said it conducted the attack at President Donald Trump's direction as a "defensive action" against Soleimani, who it said was planning further attacks on American diplomats and service members.

Soleimani is an extremely influential figure inside Iran, heading Iran's elite Quds Force, part of the country's hard-line paramilitary Revolutionary Guard Corps.

"General Soleimani was actively developing plans to attack American diplomats and service members in Iraq and throughout the region," the Defense Department said in a statement Thursday night. "General Soleimani and his Quds Force were responsible for the deaths of hundreds of American and coalition service members and the wounding of thousands more."

Iran's Supreme Leader Ayatollah Ali Khamenei said Iran would observe three days of national mourning while also warning that "severe revenge awaits the criminals."

The attack represented a seismic event in the Middle East and sparked immediate fears of a wider confrontation between the U.S. and Iran.

"This is a major blow to the Iranians, symbolically as well as strategically," said Naysan Rafati, a senior Iran analyst with the International Crisis Group, which seeks to prevent global conflict. "There has been no individual as deeply associated with Iran's regional network of partners and proxies as Soleimani, which made him a hero to Tehran's allies and a villain without peer to its rivals."

Rafati said that while the Pentagon said the strike's aim was to deter further Iranian attacks, "in the short term, there is a very real possibility of retaliatory action by Iran that could reverberate across the region."

Lawmakers echoed that concern.

Sen. Richard Blumenthal, a Connecticut Democrat and member of the Armed Services Committee, said the attack that killed Soleimani could trigger a major military escalation with Iran.

“There’s no question Soleimani had American blood on his hands,” Blumenthal said Thursday night. “He was an enemy. But this step could lead to the most consequential military confrontation in decades.”

Sen. Cory Gardner, R-Colo., a member of the Foreign Relations Committee, applauded the Trump administration's decision to target Soleimani. But, he added, “I now urge the administration to be prepared for possible retaliation, including against U.S. troops stationed in the region, and to consult closely with Congress on any next steps should the situation escalate."

The Associated Press reported that Abu Mahdi al-Muhandis, the deputy commander of an Iran-backed militia organization known as the Popular Mobilization Forces, was also killed in the attack, along with several other officials.

The White House did not immediately respond to a request for comment. President Donald Trump posted an image of the American flag on Twitter Thursday night, as the social media platform alighted with speculation about U.S. involvement in the attacks.

The State Department on Friday issued a new travel warning for Americans in Iraq – urging them to leave the country immediately if possible.

“Due to heightened tensions in Iraq and the region, the U.S. Embassy urges American citizens to … depart Iraq immediately,” a Jan. 3 security alert states. The notice said that due to Iranian-backed militia attacks at the U.S. Embassy compound, all public consular operations are suspended until further notice. “U.S. citizens should not approach the embassy.”

The airstrikes came just days after Iran-backed militias stormed the U.S. Embassy in Baghdad, temporarily stranding American diplomats inside. The two-day embassy siege ended Wednesday when the militia leaders ordered protesters to pull back.

The incident prompted Trump to send about 750 additional U.S. soldiers to the Middle East. Earlier on Thursday, Defense Secretary Mark Esper said the Trump administration was prepared to act pre-emptively to prevent further Iranian attacks.

"The game has changed and we're prepared to do what is necessary to defend our personnel, and our interests and our partners, in the region," Esper told reporters at the Pentagon.

The breach at the embassy followed U.S. airstrikes on Sunday that killed 25 fighters of the Iran-backed militia in Iraq, the Kataeb Hezbollah. The U.S. military said the strikes were in retaliation for last week’s killing of an American contractor in a Dec. 27th rocket attack on an Iraqi military base that the U.S. blamed on the militia.

The Defense Department said Thursday that Soleimani had "orchestrated attacks on coalition bases in Iraq over the last several months - including the attack on Dec. 27th - culminating in the death and wounding of additional American and Iraqi personnel." The Iranian general also approved the attacks on the U.S. Embassy, the Pentagon said.