AMMAN, Jordan — Iraqi leaders are demanding U.S. troops leave the country after President Trump’s surprise visit to Iraq, which lawmakers characterized as an arrogant affront to the nation’s sovereignty.

Trump made a three-hour sojourn in Iraq, traveling to Asad Air Base, some 115 milesnorthwest of Baghdad, but he did not meet with any Iraqi officials. And in Iraq’s parliament, that perceived slight left both Washington’s allies and its foes fuming.

The visitconfirmed U.S. disregard for other nations’ sovereignty, said Hamdillah Kaabi, spokesman for nationalist Muqtada Sadr’s Sairoon party. Sadr, the Shiite Muslim cleric whose loyalists battled U.S. forces during the 2003 invasion of Iraq, now heads parliament’s largest bloc. He campaigned to limit the influence of both the U.S. and Iran in Iraq’s affairs. Kaabi said Thursday the party had long sought to end Washington’s “arrogance and disrespect” in its dealings with Iraq.

Former Prime Minister Haider Abadi, the leader who worked most closely with the U.S.-led coalition against Islamic State, said in a statement that he rejected the “method of Trump’s visit” and that “it was not appropriate to diplomatic mores and to relations with sovereign states.”

Trump was initially set to meet with Iraqi Prime Minister Adel Abdul Mahdi at the military base.However, Abdul Mahdi’s invitation to join Trump there came with only two hours’ notice for “security reasons,” said White House Press Secretary Sarah Huckabee Sanders, according to a pool report. Abdul Mahdi was in a different part of the country and unable to attend, she said.

Abdul Mahdi’s office issued a delicate statement insisting that because of “differences in the points of view on arranging the meeting,” the two leaders instead held a phone call in which they discussed “developments after the U.S. president’s decision to withdraw from Syria.”

Qais Khazali, an Iran-supported politician and head of the Asaib Ahl Haq militia, advocated a more forceful line with the U.S., vowing in a tweet Wednesday that “Iraq’s response will be with a parliamentary decision to expel [Trump’s] military forces.” He lauded Abdul Mahdi for refusing to meet Trump on such short notice.

Though Khazali’s militia is backed by Iran, it recently fought in concert with the U.S.-led coalition against Islamic State.

“And if they [U.S forces] do not go out,” he threatened, “we have the experience and ability to get them out in another way that is well known to your forces, which were forced to withdraw in humiliation in 2011.”

More than 5,000 U.S. troops have been stationed in Iraq since 2014 as part of the coalition to defeat Islamic State. That year, the jihadis blitzed through much of the country’s northern region and swatted away government troops, many of whom threw down their weapons and ran away. Islamic State then established a so-called caliphate that straddled Syria and Iraq.

Since then, successive government assaults assisted by the coalition have clawed back all ground lost to the militants. U.S. troops continue to work with Iraqi forces in an advise-and-assist capacity to chase remnants of the group.

Last week, Trump rocked the U.S. foreign policy establishment with an abrupt announcement withdrawing the approximately 2,000 U.S. troops from Syria, a decision that surprised many of his regional and international allies, not to mention members of his own administration.

He defended the decision to troops.“We’ve knocked out about 99% of the caliphate,” Trump said.

“It’s time to bring [U.S. troops] back.”

Trump said he had “no plans at all” to issue a similar order for troops in Iraq. “In fact, we could use this as a base if we wanted to do something in Syria,” Trump said.

“If, I will say this, if you take ISIS and if we see something happening with ISIS that we don’t like, we can hit them so fast and so hard, they won’t, they really won’t know what the hell happened,” he told the U.S. troops, using an acronym for Islamic State.

Although U.S. troops are in Iraq ostensibly at Baghdad’s invitation and Islamic State remains a threat, many Iraqis blame the U.S. for the jihadis’ rise. The Iraqi news media often features stories claiming falsely that U.S. warplanes are dropping supplies to the jihadis, stoking anger toward the United States.

Many commentators view the U.S. military presence as a threat to Iraq’s stability and a symbol of the weakness of its political class before foreign officials.

“Trump visited Iraq without your knowledge, without giving you attention, and without asking you to give him permission. What sovereignty are you taking after this?” tweeted Muntadhar Zaidi, an Iraqi journalist turned politician who once hurled his shoes at then-President George W. Bush when he was visiting Iraq in 2008.

“Do you have any respect from the world or your people?” Zaidi tweeted Wednesday. “If we had known he was visiting, then Iraq would have prepared for him 30 million shoes.”

nabih.bulos@latimes.com