An airstrike near Baghdad International Airport killed one of the most powerful commanders of Iran's Revolutionary Guards and a top member of the Iran-backed Hashd al-Shaabi group, local media reported Friday.

The U.S. confirmed that it carried out a strike that killed Iranian Revolutionary Guards' Quds Force commander Qasem Soleimani in the Iraqi capital Baghdad.

Qasem Soleimani, commander of the Iranian Revolutionary Guards' Quds Forces, and Abu Mahdi al-Muhandis, vice president of the Hashd al-Shaabi group, or Popular Mobilization Units (PMU), were killed in a drone strike, according to an Iraqi national TV channel.

Soleimani was the long-time commander of the Quds Forces, which has been a designated terror group in the U.S. since 2007. The group is estimated to have 20,000 members.  

In July 2018, Soleimani challenged U.S. President Donald Trump over his warning that Iran will "suffer consequences" if Tehran threatens Washington. 

Shortly after the reports on the slain military leaders, Trump posted the U.S. flag on Twitter with no comment.   

"At the direction of the President [Donald Trump], the U.S. military has taken decisive defensive action to protect U.S. personnel abroad by killing" Soleimani, the Pentagon said in a statement.

The Pentagon accused Soleimani of planning to carry out attacks on U.S. diplomats and service members in Iraq and the region, saying the slain leader was responsible for the deaths of hundreds of American and coalition service members.

"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," said the statement.

The attack came amid Iranian tensions with the U.S. after thousands of Iraqis stormed the U.S. Embassy compound on Tuesday, protesting against airstrikes Sunday in Iraq and Syria against the Kataib Hezbollah militia which killed at least 25 fighters.

The airstrikes were in response to a rocket attack Friday on a U.S. military base in Kirkuk blamed on Kataib Hezbollah, which is part of the Iran-backed Hashd al-Shaabi group. Friday's attack killed one U.S. contractor and wounded four U.S. service members.