President Trump said Friday that Iranian Gen. Qassem Soleimani was “hated and feared” within his own country and should have been killed “many years ago,” hitting back at critics just hours after he ordered a stunning Baghdad airstrike that killed the top military general.

“General Qassem Soleimani has killed or badly wounded thousands of Americans over an extended period of time, and was plotting to kill many more…but got caught!” Trump tweeted Friday, in his first direct comments about Soleimani’s death and the U.S. airstrike. “He was directly and indirectly responsible for the death of millions of people, including the recent large number of PROTESTERS killed in Iran itself.”

IRAN VOWS 'HARSH RETALIATION' AFTER US AIRSTRIKE KILLS IRANIAN GEN. QASSEM SOLEIMANI

“While Iran will never be able to properly admit it, Soleimani was both hated and feared within the country,” he continued. “They are not nearly as saddened as the leaders will let the outside world believe. He should have been taken out many years ago!”

The president’s tweets come after the Pentagon confirmed overnight that he ordered the attack that killed Soleimani and other military officials at Baghdad International Airport. Soleimani was responsible for the deaths of hundreds of American and coalition service members and the wounding of thousands more, according to the State Department.

Soleimani was the long-running leader of the elite intelligence wing called Quds Force – which itself has been a designated terror group since 2007 and is estimated to be 20,000 strong. Considered one of the most powerful men in Iran, he routinely was referred to as its "shadow commander" or "spymaster."

Secretary of State Mike Pompeo said Friday that the strike was carried out to prevent an “imminent attack” by forces directed by Soleimani, and said that the president has demonstrated that he will take “swift, decisive” actions to protect America.

"I think the Iranian leadership understands President Trump will take action. ... We made very clear that these responses would be swift and decisive. We have now demonstrated that,” Pompeo said Friday on “Fox & Friends.” “I hope the Iranian leadership will see that and see American resolve and that their decision will be to de-escalate and take actions consistent with what normal nations do.”

Pompeo added that the Trump administration has shown military “restraint” in the face of dozens of attacks directed by Iran and its proxies against American interests, culminating in the death of an American contractor in Iraq last week. A subsequent U.S. strike preceded an apparently retaliatory attack earlier this week on the U.S. Embassy in Baghdad -- it remains unclear what Iran might do next.

TRUMP ORDERS ATTACK THAT KILLS SOLEIMANI, OTHER MILITARY OFFICIALS IN BAGHDAD, PENTAGON SAYS

Democratic members of Congress and presidential candidates warned overnight that the latest strike represented a risky escalation in the region and was conducted without congressional consultation.

“Tonight’s airstrike risks provoking further dangerous escalation of violence," House Speaker Nancy Pelosi said in a statement. "America – and the world – cannot afford to have tensions escalate to the point of no return."

Complaining that lawmakers were not notified, she added: "Congress must be immediately briefed on this serious situation and on the next steps under consideration by the Administration."

Iranian President Hassan Rouhani, meanwhile, vowed to “take revenge” for what he called a “heinous crime” carried out by the U.S. Rouhani also said Iran would “raise the flag” of Soleimani “in defense of the country’s territorial integrity and the fight against terrorism and extremism in the region.”

Iran's Foreign Minister Javad Zarif tweeted after the attack "The US' act of international terrorism, targeting & assassinating General Soleimani—THE most effective force fighting Daesh (ISIS), Al Nusrah, Al Qaeda et al—is extremely dangerous & a foolish escalation."

He added that the U.S. "bears responsibility for all consequences of its rogue adventurism."

Brigadier General Esmail Ghaani, who served as Soleimani’s deputy commander since 1997, will now take over the helm as head of the Quds Force, Reuters reported, citing Iranian state media. Iran's Supreme Leader Ayatollah Ali Khamenei also warned "harsh retaliation is waiting" for the U.S.

Early Friday morning, the State Department also issued a security alert urging all U.S. citizens to “depart Iraq immediately” due to heightened tensions in the region.

“Due to Iranian-backed militia attacks at the U.S. Embassy compound, all consular operations are suspended. U.S. citizens should not approach the Embassy,” the alert said. The agency also shared phone numbers people concerned about U.S. citizens and other loved ones in Iraq could call toll free for information.

The State Department said the airstrike “was aimed at deterring future Iranian attack plans."

After the airstrike and news of Soleimani's death late Thursday, the president tweeted an image of an American flag. Early Friday, he added that: "Iran never won a war, but never lost a negotiation!"

Fox News' Danielle Wallace, David Montanaro, and The Associated Press contributed to this report.