BAGHDAD — Iraq was the uneasy epicenter of a region on edge Saturday after the killing of Iran's most prominent military leader, with an angry funeral procession winding through its capital in the morning, rockets falling after dark, and Iranian officials and President Trump trading threats of escalating military action.

Early Friday, U.S. drone strikes ripped through two cars traveling outside Baghdad’s international airport, killing Maj. Gen. Qasem Soleimani, the commander of the Iranian Revolutionary Guard’s elite Quds Force, and Abu Mahdi al-Muhandis, a powerful Iraqi militia leader, along with eight other people.

Iran immediately vowed to seek revenge for the killing of Soleimani, as the Trump administration announced that it was sending thousands of additional troops to the Middle East.

An Iranian commander quoted by the Tasnim News Agency on Saturday suggested that dozens of U.S. facilities and military assets in the Middle East were at risk, along with Israel, a key U.S. ally.

“Thirty-five vital American positions in the region are within the reach of the Islamic Republic, and Tel Aviv,” the commander, Brig. Gen. Gholamali Abuhamzeh, was quoted as saying. “The Strait of Hormuz is a vital thoroughfare for the West, and a large number of American destroyers and warships cross the Strait of Hormuz, the Sea of Oman and the Persian Gulf,” he added.

Kataib Hezbollah, an Iraqi militia backed by Iran, warned members of Iraqi security forces to keep more than half a mile from U.S. military bases, beginning Sunday evening. The militia, which led a siege of the U.S. Embassy before Soleimani’s killing, did not say why it issued the warning.

Trump, tweeting Saturday from his personal resort in West Palm Beach, Fla., appeared to be responding in kind when he said that the United States had targeted multiple sites in Iran and that those targets would be struck should U.S. military sites be attacked or Americans harmed. He also repeated the administration’s justification for Soleimani’s killing, referring to the Iranian commander as a “terrorist leader” who had been planning additional attacks.

“Iran has been nothing but a problem for many years,” Trump tweeted. “Let this serve as a WARNING that if Iran strikes any Americans, or American assets, we have targeted 52 Iranian sites (representing the 52 American hostages taken by Iran many years ago), some at a very high level & important to Iran & the Iranian culture, and those targets, and Iran itself, WILL BE HIT VERY FAST AND VERY HARD. The USA wants no more threats!”

A spokesman for the U.S.-led military coalition against the Islamic State said that “we have increased security and defensive measures at the Iraqi bases that host anti-ISIS coalition troops. Our command places protection of U.S. forces, as well as our allies and security partners in the coalition, as the top priority; we remain vigilant and resolute.”

NATO announced that it was suspending its training of troops in Iraq and the United States said that it had stepped up security at military bases in the country. The Department of Homeland Security issued a public bulletin about the potential threat for terrorism in the United States amid the surging tensions, while repeating assurances given earlier this week that U.S. officials do not know of any specific, credible threat to the United States.

The focal point of the anxiety was Baghdad, where thousands of people joined a funeral procession for Soleimani and Muhandis on Saturday as helicopters shadowed the crowds. "Death to America, death to Israel," people chanted. "We will take our revenge!"

The procession, which began in Baghdad and moved on to the Iraqi Shiite shrine cities of Najaf and Karbala, offered a vivid display of how both Iran and the United States are deeply entwined in Iraq. The crowds bellowed anti-American cries and vowed to fight to avenge one of Iran’s heroes as U.S.-allied Iraqi security forces watched over the chanting throngs. Soleimani’s burial is scheduled for Tuesday in Kerman, his hometown in southeastern Iran.

Later Saturday, rockets were fired toward Baghdad’s Green Zone, site of the U.S. Embassy, and at an air base hosting U.S. troops north of Baghdad, but they caused no casualties, according to Iraqi and U.S. officials, who did not say who fired the rockets.

On Saturday, the White House delivered a formal notification of the drone strike that killed Soleimani to Congress, as is required under the War Powers Act. The report is completely classified, according to a senior Democratic aide, but probably details the administration’s justification for the strike, as well as the constitutional and legislative rationale used to send troops.

It was unclear whether the administration would issue a nonclassified version that could be publicized.

NATO, which has several hundred personnel in Iraq, said Saturday that it has temporarily suspended its training of Iraqi forces to counter the Islamic State, according to Dylan White, a NATO spokesman. “The safety of our personnel in Iraq is paramount. We continue to take all precautions necessary,” he said in an emailed statement.

Elsewhere, regional governments were scrambling to avoid further outbreaks of violence.

Qatar’s foreign minister traveled to Tehran on Saturday and discussed “ways to maintain collective security of the region” with his Iranian counterpart, the Qatar News Agency said.

In Saudi Arabia, King Salman called Iraq’s president, Barham Salih, and discussed “the importance of calm and defusing the crisis in the region,” the Saudi Press Agency reported.

Saudi Arabia and other Persian Gulf states have reacted nervously to the escalating tensions because of their proximity to Iran and fears of a backlash due to their close partnerships, including military cooperation, with the United States.

The drone attack early Friday local time struck a two-vehicle convoy on an access road near Baghdad International Airport and also killed several of Soleimani’s local allies. Iraqi Prime Minister Adel Abdul Mahdi called the attack “an assassination” that was a “flagrant violation of the conditions authorizing the presence of U.S. troops” on Iraqi soil.

Abdul-Karim Khalaf, a security spokesman for Iraq’s prime minister, said Saturday that authorities were investigating crew members who were on the aircraft that brought Soleimani to Baghdad, reportedly from Damascus — apparently to determine how the United States learned of the Iranian commander’s whereabouts.

Khalaf, speaking to Iraq’s state news agency, reiterated that U.S. forces are not allowed to conduct military operations in Iraq without the approval of the prime minister, and he hinted that their future in the country is in doubt.

“We have alternatives to train our armed forces,” Khalaf said.

Fahim reported from Istanbul. Louisa Loveluck in Beirut and Seung Min Kim in West Palm Beach, Fla., contributed to this report.