President Donald Trump injected the United States into a volatile crisis among America's Mideast allies, siding Tuesday with Saudi Arabia and other countries against Qatar in a dispute that threatens to disrupt efforts to defeat the Islamic State group and counter Iran.

In a series of early-morning tweets, Trump appeared to endorse the accusation that the small, gas-rich kingdom funds terrorist groups, a serious allegation against a strategic U.S. partner that hosts a base with some 10,000 American troops. He also sought to cast the anti-Qatar action led by the Saudis and the United Arab Emirates as the result of his trip last month to Riyadh, where he pressed leaders from dozens of Arab and Muslim governments, including Qatar's emir, to combat extremism.

Trump said he'd told the kings, presidents and prime ministers that funding "Radical Ideology" can't be tolerated, and "Leaders pointed to Qatar - look!"

"They said they would take a hard line on funding ... extremism, and all reference was pointing to Qatar. Perhaps this will be the beginning of the end to the horror of terrorism!" Trump said on Twitter, claiming his visit to Saudi Arabia was "already paying off."

He appeared to take a more measured tone during a call with Saudi Arabia's King Salman. Trump told Salman that a united Gulf Cooperation Council is "critical to defeating terrorism and promoting regional stability," according to a White House readout of the conversation. The council includes Qatar, Saudi Arabia, the United Arab Emirates, Bahrain, Oman and Kuwait.

The president's sharp critique of Qatar pulled the U.S. directly into a conflict that American diplomats had wanted the bickering parties to resolve among themselves. The U.S. wasn't planning a major mediation role, a State Department official said, pointing to offers from Turkey and Kuwait to intervene in what is emerging as the worst diplomatic crisis in the Persian Gulf in decades.

The fracas pits Qatar - a country smaller than Connecticut and the world's biggest producer of liquefied natural gas - against Saudi Arabia, the UAE, Egypt and Bahrain. Those countries on Monday severed diplomatic ties with Qatar, leading to suspended flights and regional ports closed to Qatari ships as anxious residents started stockpiling food.

Qatar's neighbors have long accused the country of tolerating or even encouraging support for extremist groups, including al-Qaida's Syria branch - all of which Qatar denies. But its independent foreign policy has led to various tensions with its neighbors. The region's Sunni states bristle at Qatar's less hostile position toward Shiite Iran and object to its backing groups such as the Muslim Brotherhood, whose ideology challenges the system of hereditary rule in Saudi Arabia, the UAE and elsewhere.

For Trump, the rift has emerged as a key test of his goal to unite the region around destroying IS and other extremist groups, and containing Iranian influence. While he has even held out hopes that a communal effort could pave the way for Israeli-Arab rapprochement, the Qatar crisis serves as a reminder of the region's many fault lines that challenge U.S. diplomacy.

While Trump, too, shares the Saudi and UAE goals of weakening hardline Islamic movements and stemming Iran's influence, American officials hadn't publicly singled out Qatar as a problem. Like earlier administrations, Trump's had kept its concerns private while publicly praising Qatari efforts to stamp out terror financing.

"They have made progress," State Department spokeswoman Heather Nauert said Tuesday, while adding that "they and we recognize more work remains to be done."

On Monday, Trump's secretary of state, Rex Tillerson, encouraged the sides to "sit down together" to resolve irritants he said had "bubbled up" for some time. He didn't take sides.

It was unclear how Trump's broadside against Qatar might affect the U.S.-led coalition fighting IS. The U.S. relies heavily on Al-Udeid Air Base in Qatar to orchestrate air attacks in Iraq, Syria and Afghanistan. And it is trying to galvanize the Arab world to assume greater responsibility in fighting IS, something governments won't be able to do if they're consumed with internal spats.

"It's a mixed bag with Qatar," said Republican Sen. Lindsey Graham, summing up America's strategic conundrum. "They have been definitely playing footsie with a lot of terrorist organizations, but we have a big air base there."

The Pentagon cited no immediate effects from the instability on its operations. Navy Capt. Jeff Davis, a Pentagon spokesman, expressed gratitude to Qatar for supporting the U.S. presence, outlining no plans to adjust American military posture.

Yet a prolonged crisis will put significant pressure on Qatar. Millions of migrant workers and expatriates live there, and much of Qatar's food comes from Saudi Arabia across the peninsular nation's only land border, which the Saudis have now closed.

And a coup attempt or any cross-border action by the Saudis or Emiratis would put Trump in an uncomfortable position, given his now vocal support for the anti-Qatar action.

If Qatar is economically weakened or decides to retaliate against Trump's 140-character allegations, it has leverage. Beyond hosting U.S. troops, Qatar has invested billions in the U.S. and increased its clout in Washington along the way.

It's a strategy shared by other Persian Gulf countries seeking to win U.S. support - including Saudi Arabia. During his Saudi trip, Trump announced $110 billion in deals to sell weapons to the kingdom.

And in its bid to lobby the U.S. administration, the Saudis spent about $270,000 at Trump's hotel in Washington between October and the end of March, new foreign agent filings show. The Trump Organization says the money will be handed over to the U.S. Treasury.