President Donald Trump doubled down on his war of words with one of America's top Middle East allies, publicly undercutting one of his own senior aides and potentially threatening the future of a vital US military base.

At a press conference with the president of Romania on Friday, President Trump slammed the country of Qatar, which hosts 11,000 US military personnel at its Al Udeid Air Base and is currently the target of a multi-country diplomatic boycott and blockade in the Middle East led by Saudi Arabia.

“The nation of Qatar, unfortunately, has been a funder of terrorism at a very high level,” Trump said. “I've decided, along with Secretary of State Rex Tillerson, our great generals, and military people, the time has come to call on Qatar to end its funding. They have to end that funding. And its extremist ideology in terms of funding.”

But just an hour earlier, Tillerson was publicly defending Qatar. Speaking to reporters at the State Department, he called for the countries that had severed ties with Qatar to "immediately take steps to de-escalate the situation and put forth a good faith effort to resolve the grievances they have with each other.” He argued that the boycott impeded US military efforts, and was also objectionable on “humanitarian” grounds.

The completely divergent stances echoed the diplomatic chaos we saw earlier this week when the president departed sharply from the lines that Tillerson and the US ambassador to Qatar took in the immediate aftermath of the boycott. On Monday, Saudi Arabia, Bahrain, the United Arab Emirates and Egypt cut off ties to Qatar by land, water, and air in a tightly coordinated move, claiming that it was backing terrorist activity in the region.

The US ambassador to Qatar, Dana Shell Smith, tried to appeal for calm on Twitter by drawing attention to the US’s past statements of support for Qatar’s work in combating terrorism financing and highlighting the “great partnership” between the US and Qatar.

Tillerson also weighed in on behalf of Qatar, encouraging dialogue and cooperation between the states in the region. “We certainly would encourage the parties to sit down together and address these differences,” Tillerson said in Australia on Monday. “If there’s any role that we can play in terms of helping them address those, we think it is important that the [Gulf Cooperation Council] remain unified.” (The GCC is the club of Persian Gulf nations that Saudi Arabia, Bahrain, the UAE, and Qatar are a part of.)

But then along came the president to make everything more complicated.

On Tuesday morning he rattled off some tweets that were at odds with US diplomats’ statements the day before. He instead embraced Saudi’s decision, and suggested their actions were a result of his own recent rhetoric on counterterrorism.

“So good to see the Saudi Arabia visit with the King and 50 countries already paying off,” he tweeted, referring to his visit to the country weeks ago. “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!”

And today, he made it even worse.

In his desperation to take credit for Saudi’s move, to showcase it as an example of his ability to shape global events, Trump appears to be throwing Qatar under the bus. And he is willing to flatly contradict the top diplomatic personnel in his government and diminish the credibility of US rhetoric abroad in the process.