WASHINGTON — The news arrived in Iraq like a thunderbolt.
Of the countries whose nationals President Donald Trump has temporarily barred from entering the United States, this close U.S. ally would have seemed the least likely to be targeted.
Baghdad is a front-line partner in the fight against Islamic State. A major battle is underway right now: American forces are backing Iraqi and Kurdish fighters as they seek to drive jihadists from Iraq's second-largest city, Mosul.
"There's a sense of shock," said Ryan Crocker, a former U.S. ambassador to Iraq who maintains deep connections with the country. "No one saw this coming."
A disruption of U.S.-Iraqi ties could have wide impact. Thousands of American contractors work in Iraq. Business deals, including arms sales and energy, run into the billions of dollars. U.S. troops and diplomats have for years depended on Iraqis working alongside them, sometimes in life-or-death situations. There is close intelligence cooperation between the two countries.
Iraq's pro-American government was still struggling for its footing on Monday, three days after being blindsided by the executive order.
Prime Minister Haider al-Abadi, already vulnerable to restive internal factions, swiftly came under strong parliamentary pressure to retaliate with measures to keep out Americans. Lawmaker Meshan Jboori, from a Sunni faction, said the Iraqi government needed to act to "preserve the dignity of the people."
"My belief is that Trump saw that our government is weak and wanted to fulfill his promises to the electorate," he said. "The government will have trouble if they don't follow through on this decision."
Officials and ordinary citizens alike said they found it baffling to be on a list that also included the failing or failed states of Libya and Yemen and avowed U.S. rival Iran.
Among those caught by surprise was Lukman Faily, a former ambassador to Washington, who said he would not be able to travel to the United States for upcoming conferences. He told CNN that Iraqis were "astonished" by the travel ban, considering it a deep affront to national pride.
Diplomatically, Iraq has so far been treading carefully. On Monday, the Foreign Ministry issued a statement asking the new U.S. administration to "reconsider this wrong decision."
"We affirm Iraq's desire to strengthen the strategic partnership between the two countries," it said, noting the essential nature of cooperation in fighting the jihadists of Islamic State.
Then there are families who had hoped to escape their homeland's violence and make new lives for themselves in the United States. The wife and four children of Nizar Isaac — members of a minority Christian sect from a village outside Mosul — were approved for refugee visas and had planned to leave Tuesday for Michigan, reuniting with a son who had arrived in the U.S. two months earlier.
In a shabby Beirut apartment, five suitcases wrapped in cellophane and two red UNICEF tote bags were ready to go. The travel ban dashed the family's departure hopes.
Isaac, a 52-year-old plumber, had planned to stay behind because his application was rejected. He had been distraught over the prospect of being separated from his wife and children, but that was outweighed by the desperate hope that they would find safety and refuge in the United States.
"I didn't know if I could follow them or not," he said. "It was like I was getting a divorce, but I had accepted it."
The ban, which blocks entry of all Iraqi citizens for 90 days, also includes Iran, Libya, Somalia, Sudan, Syria and Yemen. Trump's order also keeps out all refugees for 120 days and Syrian refugees indefinitely.
Particularly galling to some was the notion that Iraqis entering the United States posed a terrorist threat, in light of the fact that few countries have been harder hit by terrorism. Suicide bombings and other attacks have killed and maimed thousands over the last decade.
Compounding the resentment, Trump rattled Iraq with repeated assertions that the United States should have "taken the oil" when it toppled dictator Saddam Hussein. Experts said any move to seize oil reserves as spoils of war would have been in violation of international law, but Trump — who had floated the idea during his campaign — brought it up again after taking office.
"We should have kept the oil, but OK, maybe we'll have another chance," the president said on a visit to CIA headquarters a day after being sworn in. In the Arab world, those comments helped fuel a belief in some quarters that U.S. Mideast policy is largely predicated on a wish to plunder the region's energy resources.
In Washington, the travel ban left Trump's most senior Cabinet members struggling to contain the fallout even as they settled into new jobs. Defense Secretary James N. Mattis, who began work the day the order came down, was reportedly not consulted in advance about the directive.
The Pentagon, which has 5,000 U.S. troops in Iraq, was seeking to shield Iraqi citizens who have worked with the U.S. military from the travel ban, compiling a list of Iraqis to recommend be exempted.
At the State Department, where regional experts were also reportedly excluded from the drafting process, Secretary of State-designate Rex Tillerson is not yet in his post. Diplomats, including many with Mideast expertise, were already circulating a memo for the department's official internal "dissent channel" to express opposition to the directive.
The U.S. ambassador to Iraq, Douglas A. Silliman, was left scrambling to deal with the travel ban's fallout. Silliman, who took up his post less than five months ago, was meeting with lawmakers to try to stave off a vote for Iraq to respond in kind to the U.S. restrictions, among other urgent consultations.
To many inside and outside Iraq, the travel ban posed the potential to undercut the U.S.-led fight against Islamic State, and at the very least provided a propaganda gift to jihadist supporters. Backers of Islamic State were cheering from the social-media sidelines, citing Trump's move as proof that Muslims would never be accepted by the West.
Two powerful Republican senators, John McCain of Arizona and Lindsey Graham of South Carolina, said Sunday that the presidential directive could "do more to help terrorist recruitment than improve our security" by inflaming resentments against the U.S.
"We fear this executive order will become a self-inflicted wound in the fight against terrorism," the two said in a joint statement.
Separately from the consternation in Baghdad, officials in the semiautonomous region of Kurdistan were worried as well. As Iraqi passport holders, its people fall under provisions of the travel ban. That leaves many Iraqi Kurds with U.S. ties in limbo, including students, aid workers and businesspeople.
The Kurdistan regional government, which has a separate diplomatic mission in Washington, said in a statement that it was trying to get more information from the Trump administration about the order's scope and effects.
In Lebanon, which has been a prime refuge for Iraqis hoping to travel onward to the United States or other destinations, the directive left many despondent, said Suheil Anton, a former oil engineer who has become an unofficial spokesman for displaced Iraqi families.
"We thought that things would open up for Iraqis this year, since they would barely let anyone in last year," he said. "But this is a betrayal of Iraqis now."
(Special correspondent Bulos reported from Beirut and staff writer King from Washington.)