The Trump administration tried, unsuccessfully, to persuade top Iraqi officials to kill a parliamentary effort to force the U.S. military out of Iraq, according to two U.S. officials and an Iraqi government official familiar with the situation.

Why it matters: The Iraqi parliament passed a resolution today calling on the Iraqi government to expel U.S. troops from Iraq, after the U.S killed Iranian Gen. Qasem Soleimani and a leader of an Iraqi militia with a drone strike near Baghdad airport.

This resolution could ultimately lead to the U.S. military being forced out of Iraq. But the outcome remains uncertain, and the prime minister who needs to sign it recently resigned.

"I think it would be inconvenient for us, but it would be catastrophic for Iraq," said a U.S. official familiar with the Trump administration's effort to block the vote. "It's our concern that Iraq would take a short-term decision that would have catastrophic long-term implications for the country and its security."

"But it's also, what would happen to them financially," the official added, "if they allowed Iran to take advantage of their economy to such an extent that they would fall under the sanctions that are on Iran?” (Countries can be subject to the sanctions if they engage in certain kinds of trade with Iran.)

“We don't want to see that. We're trying very hard to work to have that not happen," the official said.

"The United States is disappointed by the action taken today in the Iraqi Council of Representatives," said State Department spokesperson Morgan Ortagus.

"While we await further clarification on the legal nature and impact of today's resolution, we strongly urge Iraqi leaders to reconsider the importance of the ongoing economic and security relationship between the two countries and the continued presence of the Global Coalition to Defeat ISIS."

"We believe it is in the shared interests of the United States and Iraq to continue fighting ISIS together. This administration remains committed to a sovereign, stable, and prosperous Iraq."

Behind the scenes: Trump administration officials have warned senior Iraqi officials that Iraq would suffer dangerous consequences if the U.S. withdrew its military and its funding of the Iraqi security apparatus, according to sources familiar with the outreach.

On the other hand, Trump has also told advisers he thinks it's ridiculous that America has been paying billions of dollars to support an Iraqi security apparatus that, in his view, is demonstrably incompetent, disloyal to America and close to Iran.

"For the president's position, he has been very clear about that, and he's not alone in that thinking," said a U.S. official. "In terms of developing policy options for him [the president], that's something we review constantly. What is our assistance to Iraq going to fund?"

In the meantime, Trump has sent thousands of troops to the Middle East to counter Iran.

The other side: A senior Iraqi official emphasized that many Kurdish and Sunni members of parliament, who tend to be more supportive of the American presence in Iraq, did not attend the vote to expel the U.S.

"This is a temporary victory for the parties which are pro-Iranian," said the official. "But it's also a clear message from the Sunnis and from the Kurds [who didn't vote] and from some Iraqi Shia for the Americans to tell them we want you to stay in Iraq."

But Abbas Kadhim, who leads the Atlantic Council Iraq Initiative and was a senior adviser to the Iraqi ambassador during the Obama administration, thinks the vote has more serious long-term consequences for the U.S.-Iraq relationship.

"If this vote tells us anything, it confirms that if Iraqis are cornered and forced to choose between the U.S. and Iran, they will find it safer to choose Iran," Kadhim told me. "Military and business relations are completely lost for the foreseeable future."

The big picture: A U.S. withdrawal from Iraq — something Trump has long wanted but has felt forced to defer — would deeply undercut America's ability to fight ISIS.

"We still have a fairly significant ISIS problem," said a U.S. official familiar with the planning. "It hasn't escaped ISIS' attention that Iraq is in something of disarray right now."

The U.S.-led coalition in Iraq and Syria has interrupted its anti-ISIS mission as it prepares for Iran to retaliate, military officials told the New York Times.

Go deeper: Anti-ISIS coalition suspends operations due to Iran threat