ISTANBUL — Top US allies in the Middle East said they were concerned about signs of chaos within the Trump administration after the resignation of Michael Flynn from the post of national security adviser less than a month into the job.

One Middle East official agreed with the description of the turmoil in Washington as “fitna,” which means sedition in Arabic, a loaded term that refers to the violent struggle that marked the Shiite–Sunni split in Islam.

But officials were also confident that the US system would quickly stabilize and maintain focus on top priorities like defeating ISIS and confronting Iran, which Flynn put on notice after a ballistic missile test in one of his first acts as national security adviser.

Few if any leaders in the Middle East publicly commented on Flynn’s departure, but American adversaries were likely heartened by the chaos in Washington. A commentator on Iran's state-run Press TV called Flynn's resignation “unfortunate for Flynn, but good for Iran because he was such an outspoken enemy of Iran.”

Iraqi lawmaker Mowaffak Rubaie, who served as the country’s national security adviser, worked with Flynn when he was a top military official in Baghdad and considered his American counterpart a “reasonable guy” despite “an obsession about Iran.”

The US and Iraq are close partners in the war against ISIS, with between 5,000 and 6,000 US troops collaborating with Iraqi forces to dislodge militant fighters in the city of Mosul and elsewhere in Iraq.

Rubaie said he had hoped Flynn would counterbalance the inexperienced alt-right extremists within the Trump administration and even President Donald Trump himself, who recently suggested that the US should have seized Iraq’s oil during the initial invasion and may even do so in the future, a remark that angered many Iraqis.

Flynn’s sudden resignation makes it likely that Iraq and other allies will continue to face uncertainty about US policies towards the region.

“Its unpredictability is the real problem,” Rubaie told BuzzFeed News in a telephone interview from Baghdad. “It’s the lack of experience in the presidency and the lack of knowledge of the president. You cannot predict what he's going to do or say next.”

Still, Rubaie, who serves on parliament’s national security committee, said he had detected no sense of panic among Iraqi military and police officials working with and sometimes alongside US commanders and soldiers in the ongoing war against ISIS.

“We have been going through this for weeks ago and we haven’t seen a lot of changes,” he said. “We’ve heard a lot of rhetoric, but seen nothing on the ground. The Americans are working with Iraqis and synchronizing their effort with the Iraqis.”

In Egypt, which has long been a bedrock of US policy in the Middle East, officials in the government of President Abdel Fattah el-Sisi saw in Flynn a potential ally who was hostile to political Islam, and might be disappointed to see him go. They remain confident Trump will support Cairo more adamantly than his predecessor.

Sisi seized power in a 2013 coup from an elected Islamist president who was supported by the Muslim Brotherhood, a mostly nonviolent movement that advocates for a greater role for religion in a number of Middle Eastern countries. Since the coup, Sisi has banned the Brotherhood and locked up its leaders, forcing the movement underground.

“There is a kind of fresh hope that the relations with the Trump administration will be better than with Obama,” said one Egyptian official, speaking on condition of anonymity because he was not authorized to speak to the press.

“This came with the invitation to President Sisi to visit Washington maybe in March, and apparently both of them were having a good time talking to each other in New York last year and after Trump’s inauguration last month,” the official said. "It is also reflected in the US seeking to declare the Muslim Brotherhood a terrorist group."

The Israeli government of President Benjamin Netanyahu will likely see Flynn’s ouster as a minor setback. Flynn, a staunch opponent of Israel’s arch-rival Iran, reportedly set up Netanyahu’s ongoing visit to the US and scheduled meeting with Trump on Wednesday.

Two officials in Turkey — host to a major US airbase and a key staging ground for the ongoing war against ISIS — declined to comment on Flynn’s removal. Flynn was seen as an advocate for Ankara’s cause after he authored a controversial opinion piece urging the extradition of Pennsylvania-based cleric Fethullah Gulen, whom Turkey accuses of masterminding a failed July 15 coup.

Flynn’s consulting firm had also been hired by a Turkish firm in an arrangement that ethics experts said raised red flags.