Baghdad, Iraq (CNN) US President Donald Trump has said that he ordered a precision strike to "terminate" a top Iranian commander who was plotting "imminent and sinister attacks" on Americans, adding that the decision was one of deterrence rather than aggression.

"We took action last night to stop a war. We did not take action to start a war," Trump said in a statement from his Mar-a-Lago resort on Friday, a day after a US drone strike on a Baghdad airport killed Qasem Soleimani.

Later, while at a Miami church for an Evangelicals for Trump event, the President said: "He was planning a very major attack and we got him."

Iran, in a letter to the United Nations, called the attack state terrorism and an unlawful criminal act.

Majid Takht Ravanchi, Iran's ambassador to the UN, told CNN's "Erin Burnett Out Front" that the attack was "tantamount to opening a war." There will be revenge, he said.

"The response for a military action is a military action. By whom? When? Where? That is for the future to witness," he said.

He said Washington has escalated a war it began when it pulled out of a nuclear deal with Tehran.

"The US has started the economic war in -- in May 2018. Last night, they started a military war. By assassinating, by an act of terror, against one of our top generals," he told CNN.

The move marks a major escalation in regional tensions that have pitted Tehran against Washington and its allies in the Middle East, raising the specter of further regional destabilization. The strike, condemned by Iran and its allies as an "assassination," has been met with concern by European officials and the United Nations, who have called for de-escalation.

The Pentagon on Thursday confirmed the strike killed Soleimani , who as head of the Islamic Revolutionary Guards Corps (IRGC) Quds Force became the architect of Tehran's proxy conflicts in the Middle East.

Abu Mahdi al-Muhandis -- the deputy head of the Iran-backed Iraqi Popular Mobilization Forces (PMF) -- was also killed, according to a statement from the PMF, which said the pair "were martyred by an American strike."

Abu Mahdi al-Muhandis, left, and Qasem Soleimani were killed in the US strike.

Early Saturday, the group said another airstrike that targeted a convoy in the Taji area north of Baghdad killed and wounded a number of PMF members.

The initial report indicates a medical units convoy was hit near Taji Stadium in Baghdad, the PMF said. No one has claimed responsibility for the attack.

The Trump administration viewed Soleimani as a ruthless killer, and the President told reporters Friday that the general should have been taken out by previous presidents.

The Pentagon blamed Soleimani for hundreds of deaths of Americans and their allies in several attacks in recent months.

"General Soleimani was actively developing plans to attack American diplomats and service members in Iraq and throughout the region," the Pentagon said in a statement Thursday, calling the strike "decisive defensive" action aimed at deterring future Iranian attacks.

The Pentagon blamed Soleimani and his Quds Force for attacks on coalition bases in Iraq in recent months, including the December 27 strike that culminated in the deaths of an American contractor and Iraqi personnel. He was also blamed for the December 31 US Embassy attack in Baghdad , and in addition to the hundreds killed in his time as a commander, thousands more were wounded, the Pentagon said.

US Secretary of State Mike Pompeo and the State Department's special representative for Iran, Brian Hook, said the strike was aimed at deterring impending attacks.

This vehicle was hit in the US airstrike Friday.

Pompeo told CNN that the strike had thwarted an "imminent" attack in the region, but declined to give any details on the intelligence on which he based his statement. Hook, who told Al Arabiya that he had seen "all of the intelligence" on the action, suggested that "American personnel and facilities in Lebanon, Iraq, Syria and beyond" were the planned targets.

At least six people were killed in the strike, an Iraqi security source told CNN on condition of anonymity.

After initial reports emerged, Trump shared a cryptic tweet that consisted only of an image of the US flag. Later, Trump tweeted that Soleimani "should have been taken out many years ago."

Trump remains open to talks without preconditions with Iran, National Security Adviser Robert O'Brien said.

The President has offered to talk "at any time" with Iran, but "those efforts have been rebuffed," O'Brien told reporters on a briefing call.

O'Brien said Soleimani was in Damascus, Syria, before he traveled to Baghdad.

Iran vows revenge, Middle East on alert

Iran will hold three days of national mourning. Funeral processions will be held for Soleimani in both Iran and Iraq, Iranian state-run IRNA news agency reported.

Thousands of demonstrators were seen marching in Tehran and other cities to protest the strike after Friday prayers, news agency video footage shows.

Men, women and children carried images of the slain commander, many crying and others shaking their fists, shouting "Death to America" and "Revenge, revenge, revenge." Protesters also ripped up a US flag and burned an Israeli one.

Protesters mourn the death of Qasem Soleimani Friday in the Iranian capital, Tehran.

The Supreme Leader, Ayatollah Ali Khamenei, has vowed "harsh revenge," according to a statement published to his official website.

"His pure blood was shed in the hands of the most depraved of human beings," Khamenei said, adding that it had been Soleimani's wish to become a martyr.

Khamenei has appointed Maj. Gen. Ismail Qaani as Soleimani's replacement, according to a statement from his office published by IRNA. Qaani had served for years alongside Soleimani, he said.

Some US officials are bracing for Iran to retaliate with a cyber attack, but Iran has shown it's also capable of engaging in another form of online warfare: social media disinformation campaigns

Authorities in the United States on Friday were increasing vigilance and fortifying defenses

Protesters in Tehran demonstrate Friday against the airstrike in Iraq.

Iraq's anti-government protesters, who have been staging a demonstration for months in Baghdad's Tahrir Square, condemned America for violating Iraq's sovereignty and "committing assassinations of Iraqi figures." One of their key demands is an end to heavy-handed Iranian influence in Iraq, but they made clear that that did not equate to support of US actions.

Muqtada al-Sadr, who leads the largest political bloc in Iraq's Parliament, has ordered the revival of the Mehdi Army, which fought US troops during the 2003 invasion, he said in a statement. He also called on Iraqis to exercise "wisdom and shrewdness."

One pro-Iranian Iraqi cleric, Qais al-Khazali, called for the removal of US forces from Iraq and for the "demise" of Israel, as a response to the deaths of Soleimani and al-Muhandis.

Khamenei pays a visit to Soleimani's family.

There are concerns, too, that the killing on Iraqi soil could have a destabilizing effect on that country and create space for a new proxy war, according to Feisal Istrabadi, the founding director of the Indiana University Center for the Study of the Middle East told CNN.

"This is a huge deal throughout the Middle East. The fact that it was done over the territory of Iraq means that Iraq will become what I feared it would become from the beginning: the battleground between Iran and the United States."

Hassan Nasrallah, head of the Iran-backed Lebanese militant and political group Hezbollah, has also vowed to avenge the killings, while Israel is assessing its security following the attacks, including at its diplomatic missions around the world.

US ally Saudi Arabia has called for restraint in the wake of the strike, which it said came as a result of "terrorist acts" that the kingdom had previously denounced.

The US State Department is urging its citizens to leave Iraq immediately. US embassies in Bahrain, Kuwait and Pakistan have issued security alerts to US government employees and citizens.

The force protection level for all US military in the Central Command area of operations has been increased in the last 24 hours, two US defense officials said Friday morning, and the US plans to deploy thousands of additional troops to the Middle East as tensions with Iran mount.

Biden says US strike 'dynamite in a tinderbox'

In the US, the news of Soleimani's killing generated starkly different reactions along party lines, with Republicans heaping praise on Trump and Democrats expressing concerns about the timing, legality and consequences of the strike

Former Vice President Joe Biden, a Democratic presidential frontrunner, warned that the US strike could trigger a conflict across the Middle East.

"President Trump just tossed a stick of dynamite into a tinderbox, and he owes the American people an explanation of the strategy and plan to keep safe our troops and embassy personnel, our people and our interests, both here at home and abroad, and our partners throughout the region and beyond," Biden tweeted.

Sen. Chris Murphy, a Connecticut Democrat, emphasized that Soleimani "was an enemy of the United States" in a tweet, but asked: "The question is this -- as reports suggest, did America just assassinate, without any congressional authorization, the second most powerful person in Iran, knowingly setting off a potential massive regional war?"

Some key members of Congress -- such as Senate Minority Leader Chuck Schumer, a New York Democrat who is a member of the congressional Gang of Eight leaders, who are briefed on classified matters -- had not been made aware of the attack ahead of time. It's unclear how many other lawmakers had advance notice of the strike.

Schumer said on the Senate floor Friday that the President "does not have the authority for a war with Iran" and that Trump would need congressional approval for a large increase in troops and "and potential hostility over a longer time."

Republicans reacted with almost uniform praise for Trump.

"I appreciate President @realDonaldTrump's bold action against Iranian aggression," GOP Sen. Lindsey Graham of South Carolina, a fierce Trump ally, wrote in a tweet Thursday. "To the Iranian government: if you want more, you will get more."

Sen. Ben Sasse, Republican of Nebraska, said in a news release that "General Soleimani is dead because he was an evil bastard who murdered Americans" and "the President made the brave and right call, and Americans should be proud of our service members who got the job done."