Qatar’s Emir Sheikh Tamim bin Hamad Al-Thani meets with President Trump in Saudi Arabia. (Photo: Jonathan Ernst/Reuters)

WASHINGTON — In a head-spinning shift that could affect the war on ISIS, President Trump on Wednesday accused Qatar of funding extremism and mused that the oil-rich U.S. ally’s growing diplomatic isolation might mark “the beginning of the end to the horror of terrorism.”

Trump’s comments on Twitter marked a sharp reversal from the White House’s pledge just one day earlier to “deescalate” a feud in which Saudi Arabia and three other Arab countries have formally cut diplomatic ties with Qatar and frozen travel to and from the oil-rich nation, accusing it of financing extremists and supporting Saudi Arabia’s regional rival, Iran. Qatar has rejected what it called “false and baseless claims.”

The Tuesday tweets were also a major shift from Trump’s own warm remarks from his first foreign trip, when he sat down during with the emir of Qatar. The small coastal country on the Arabian Peninsula hosts the largest U.S. military base in the Middle East.

“One of the things that we will discuss is the purchase of lots of beautiful military equipment, because nobody makes it like the United States,” Trump said at the May 21 meeting. “And for us, that means jobs and it also means, frankly, great security back here, which we want.”

On Tuesday, Trump pivoted away from that conciliatory tone, lining up the United States behind Saudi Arabia, Egypt, the United Arab Emirates and Bahrain in their escalating feud with Qatar.

“So good to see the Saudi Arabia visit with the King and 50 countries already paying off. 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 in two tweets. He did not address Washington’s own diplomatic relations with Doha.

It was unclear what impact, if any, the president’s remarks would have on the military campaign against the so-called Islamic State. Qatar hosts the Al Udeid air base, which coordinates air power over Syria, Iraq and Afghanistan, among other countries. The facility is also home to some 10,000 U.S. military personnel.

Story continues

Qatar has long supported Islamists in the Middle East, like the Muslim Brotherhood and some fighters in Syria. In 2013, the Taliban opened an office in Qatar as part of a U.S.-welcomed effort to work out a political settlement in Afghanistan.

President Trump takes his seat before his speech to the Arab Islamic American Summit in Riyadh, Saudi Arabia. (Photo: Reuters/Jonathan Ernst)

Trump unveiled his new position two days before former FBI Director James Comey is to testify before Congress as part of an investigation into alleged ties between the president’s 2016 campaign and Russia. The U.S. intelligence community has accused Moscow of meddling in the election.

On Monday, before Trump’s tweets, Defense Secretary Jim Mattis and Secretary of State Rex Tillerson predicted that the rift between Qatar and its regional neighbors would not affect the war on ISIS. They also offered U.S. help to resolve the dispute diplomatically.

“In regards to the implications for the counter-ISIS fight, I am positive there will be no implications coming out of this dramatic situation at all, and I say that based on the commitment that each of these nations that you just referred to have made to this fight,” Mattis said.

Said Tillerson, “We certainly would encourage the parties to sit down together and address these differences, and if there’s any role that we can play in terms of helping them address those, we think it is important that the GCC remain unified.” He was referring to the Gulf Cooperation Council, through which the countries involved cooperate on military issues.

“I do not expect that this will have any significant impact, if any impact at all, on the unified fight against terrorism in the region or globally,” Tillerson added.

At the White House, deputy press secretary Sarah Sanders told reporters on Monday that Trump “is committed to continuing to have conversations with all of the people involved in that process, with all of those countries.”

And, she said, “We want to continue to deescalate that. And at this point, we’re continuing to work with each of those partners.”

Read more from Yahoo News: