As French President Emmanuel Macron visited Washington, President Trump appeared to take aim at Western allies in the Middle East — implying that they would crumble within “a week” if the United States didn't protect them.

“Countries that are in the area, some of which are immensely wealthy, would not be there except for the United States and, to a lesser extent, France,” Trump said at a news conference Tuesday.

“They wouldn't be there except for the United States,” he went on. “They wouldn't last a week. We are protecting them. They have to now step up and pay for what is happening.”

Trump's remarks — though only an aside in a longer discussion about Syria — stirred little official response from U.S. allies in the Middle East. But one of America's main foes, Iran, had something to say. On Thursday, Iran's supreme leader Ayatollah Ali Khamenei called the comments a “humiliation for Muslims.”

The Iranian leader suggested that Trump's comments showed that the Muslim world needed to unite. “Muslims should stand firmly against the U.S. and other domineering powers’ bullying,” the Iranian leader tweeted in English. “If they don’t observe that, they will be humiliated.”

The U.S. president did not specifically refer to any countries in his remarks Tuesday. However, many interpreted them as a slight against Persian Gulf allies such as Saudi Arabia and the United Arab Emirates — two countries at odds with Iran over a number of factors, including Tehran's deep involvement in the Syrian conflict and claims that Iran backed rebels in Yemen.

Trump has previously called on its Gulf allies to pick up more of the financial and military burden in the Syrian conflict as the United States winds down its military presence. During a phone call with Saudi King Salman in December, Trump asked Saudi Arabia for $4 billion for the effort in Syria.

Later, when the powerful Saudi Crown Prince Mohammed bin Salman visited Washington in March, Trump used an Oval Office press appearance to emphasize that the Saudis need to take up more responsibility in the Middle East. Trump also listed a number of U.S. arms sales to Saudi Arabia, before stopping to tell the crown prince that the costs were “peanuts” for the oil-rich kingdom.

In early April, CNN reported that Trump had directly criticized an unnamed Gulf leader in a private conversation that he later relayed to friends. “Without us you wouldn't last two weeks. You'd be overrun. And you'd have to fly commercial,” Trump reportedly recalled saying.

Andrew Bowen, a Middle East expert at the American Enterprise Institute, said that Trump's message on Tuesday was consistent with previous statements made privately and publicly. “It’s not as if this came as a surprise and it’s a reality the Gulf rulers have come to live with,” Bowen said via email, before adding: “This isn’t to say everyone is happy with Trump’s views.”

On social media, many in the Middle East took umbrage with Trump making the critical remarks so publicly. Abdulkhaleq Abdulla, a well-known Emirati political commentator, tweeted to the U.S. president on Tuesday that his country and others will survive after Trump is gone.

Emirati businessman Khalaf Ahmad al-Habtoor also issued his own response to Trump's remarks, calling the American's remarks “unacceptable” and ignorant of Gulf history.

Kristian Ulrichsen, a Gulf expert at the U.S.-based Baker Institute for Public Policy, said that Trump's remarks seemed to have allowed “a lot of pent-up frustration and resentment to come out,” particularly in the United Arab Emirates, where Ulrichsen said “feelings may have been compounded by a sense of an opportunity lost after all the effort they put in to shape the thinking of the administration as it entered office last year.”

By and large, however, political leaders in countries like the United Arab Emirates and Saudi Arabia have kept quiet. Saudi foreign minister Adel al-Jubeir responded to Trump's comments by issuing a criticism not of the United States, but of Qatar — which has been diplomatically isolated by Gulf Arab neighbors for its links to perceived threats to the ruling status quo such as Egypt's Muslim Brotherhood.

According to a statement carried by the official Saudi Press Agency, the Saudi diplomat said that Qatar should pay the cost of U.S. forces in Syria and also send its own forces to the country “before the U.S. President lifts American protection of the State of Qatar, which is embodied by the U.S. military base on its soil.”

Jubeir also said that Qatar's regime would “fall within less than a week” if the United States withdrew its support. Saudi Arabia, along with other Arab Gulf states, have been involved in a diplomatic standoff with Qatar since last June.

Ali Shihabi, executive director of the pro-Saudi think tank Arabia Foundation in Washington, suggested that Jubeir's comments appeared to be less about Qatar and more a “negative reaction” to Trump's remarks. “Saudi is saying if that is Trump's criteria then he can go bill Qatar which today hides behind a U.S. umbrella,” Shihabi tweeted.

Open criticism of the Trump administration is risky for some Gulf Arab allies.

The leaders of both Saudi Arabia and the United Arab Emirates have aggressively pursued close relations with Trump — despite evidence of significant negative views of the American leader among the general public — as they saw it as a welcome change after President Obama sought better ties with Iran.

Bowen noted that it was not clear whether Gulf Arab allies would be able to foot more of the bill in the Middle East, especially with Saudi Arabia undergoing a potentially expensive set of domestic reforms at the same time.

However, Trump may need to be cautious of alienating these allies too. Qatar and Saudi Arabia had shown an eagerness to work with Trump's regional initiatives, Bowen added, and “Trump will need the Gulf to reconstruct Syria if and when that conflict ends.”

More on WorldViews

Trump claims the U.S. has spent $7 trillion in the Middle East. It hasn’t.