WASHINGTON — US President Donald Trump's executive order on immigration is rocking the relationship with Iraq, America's key ally in the fight against the Islamic State group.

As the US and Iraq prepare to take the ISIS stronghold of Mosul, the Iraqi parliament has passed a measure banning Americans from traveling to the country in response to Trump's ban on travel from Iraq and six other Muslim-majority countries, The Associated Press reported.

"This decision by the U.S. is arbitrary," Intisar Al-Jabbouri, a Sunni lawmaker from northern Iraq, told Time magazine. "The Iraqi government has the right to reciprocate."

The Trump administration is facing political heat domestically over its order, which includes a 90-day ban on travel to the US by citizens of Iraq, Syria, Iran, Sudan, Libya, Somalia and Yemen, and a 120-day suspension of the US refugee program.

The order has also reverberated among US allies in the Muslim world, where it should be found "pretty disturbing," said Ryan Crocker, a former US ambassador to Iraq, Pakistan, Syria, Kuwait, Lebanon and Afghanistan. That's because the US signed a bilateral agreement with Iraq that calls for strategic cooperation at every level.

"They know we're heavily involved in the fight to take Mosul, and they have to be asking themselves, if they'll do this to the Iraqis, they'll do it to us," Crocker said.

The move raised concerns of both a violent backlash against US advisers and troops, who are in the Middle East for the counter-ISIS fight, and that ISIS could use a perceived Muslim immigration ban as a recruiting tool.

"The Iraqis are of course going nuts, just as they're about to do the next phase against the Islamic State, and Islamic State social media is celebrating," Crocker said.

There is also the possibility for disruption of US arms sales to the named countries, with the immediate impact on Iraq most likely, according to Andrew Hunter, director of the Defense Industrial Initiatives Group at the Center for Strategic and International Studies. 

The executive order has raised concerns about a disruption in training for Iraqi pilots in Arizona. If the training is disrupted, Iraq may turn to non-US platforms—and reciprocal visa restrictions may bar US contractors from performing  maintenance and training across all the US platforms that the Iraqis are operating.

While it is possible the executive order will be revised to incorporate exceptions for these purposes, "There is definitely the potential for impact to US foreign military sales," Hunter said. 

One US partner in the Gulf may see a positive in the inclusion of Iran and Yemen: Saudi Arabia. Relations between the US and Saudi Arabia turned rocky as the Obama administration felt Riyadh was not doing enough to combat ISIS, while Riyadh felt betrayed by the administration's nuclear deal with Iran. Meanwhile, the Obama administration pressed Riyadh to stop its air campaign against Shiite Houthi rebels in Yemen.

"There may be something of a positive reaction, while you won't see anything publicly out of the Saudis," Crocker said. "They could be viewing this as a tactical step that doesn't hit them but does hit those they're equally against. But long term, if we can do this to Iraq, we can do it to Saudi Arabia."

The Trump administration has expressed openness to adding further countries to the list. White House Chief of Staff Reince Preibus told NBC's Chuck Todd on Sunday that the seven countries chosen were Washington's "most watched in regard to harboring terrorists" and that "perhaps other countries need to be added."

A day after Trump signed the executive order, he had several conversations with Arab leaders. He called the crown prince of Abu Dhabi. Jordan's King Abdullah II visited Trump in Washington on Monday and Saudi Arabian Foreign Minister Adel Al Jubeir also reportedly visited Washington over the weekend.

Trump spoke with Saudi Arabian King Salman bin Abdulaziz al-Saud on Sunday, discussing the possible formation of safe zones in Syria and Yemen, as well as new efforts to fight terrorism.

"The President requested and the King agreed to support safe zones in Syria and Yemen, as well as supporting other ideas to help the many refugees who are displaced by the ongoing conflicts," a readout said.

In the US, the order sparked public demonstrations around the country and even negative reactions by some Republican lawmakers. Critics said the order unfairly singled out Muslims, violated US law and the Constitution, and defiled America's historic reputation as hospitable to immigrants.

Senate Minority Leader Chuck Schumer, D-N.Y., said he would bring legislation to the chamber Monday evening seeking to end the ban.

"We should repeal this, and then we should sit down in a careful, thoughtful way to figure out ways we need to tighten up things against terrorism," Schumer told NBC News.

Nearly 20 Republican lawmakers have voiced opposition to the ban, to varying degrees, by The Washington Post's last tally. Senate Armed Services Chairman John McCain, R-Ariz., with Sen. Lindsey Graham,  R-S.C., condemned the order over reports it went into effect with little to no consultation with the departments of State, Defense, Justice and Homeland Security.

In a series of Twitter posts, Trump blamed computer outages, Schumer and protesters for the chaos. He also fired back at the two outspoken Republican senators Sunday afternoon in two tweets:

"The joint statement of former presidential candidates John McCain & Lindsey Graham is wrong — they are sadly weak on immigration," Trump said.

"The two ... Senators should focus their energies on ISIS, illegal immigration and border security instead of always looking to start World War III."

In a joint statement, McCain and Graham complained the order bans Iraqi pilots from coming to military bases in Arizona, even as Washington and Baghdad cooperate in the ongoing battle for Mosul.

"Ultimately, we fear this executive order will become a self-inflicted wound in the fight against terrorism. At this very moment, American troops are fighting side-by-side with our Iraqi partners to defeat ISIL," the statement reads, using an acronym for the Islamic State group.

"Our most important allies in the fight against ISIL are the vast majority of Muslims who reject its apocalyptic ideology of hatred. This executive order sends a signal, intended or not, that America does not want Muslims coming into our country."

Texas Republican Rep. Will Hurd, a former CIA officer, said the order makes allies less willing to fight with America and makes US officials overseas less safe.

"A target has been placed on their backs by increasing tensions in an already volatile region," Hurd said in a statement. "These men and women are fighting alongside the citizens of those countries in order to keep Islamic Extremists on the run and off our shores."

Note: This story was updated at 3:50 p.m. EST, Jan. 30, 2017, to include Andrew Hunter's comments.

Email:  jgould@defensenews.com

Twitter:  @reporterjoe

Joe Gould is the senior Pentagon reporter for Defense News, covering the intersection of national security policy, politics and the defense industry. He served previously as Congress reporter.

More In Congress