Without warning, Donald Trump jumps Twitter-finger first into Middle East regional tensions and betrays a longtime American ally.

In yet another early morning rant, Donald Trump appeared to announce an entirely new policy toward Qatar, potentially endangering thousands of United States military personnel in the Middle East as a result.

On Monday, Saudi Arabia and a number of other Arab states cut off diplomatic ties and took other aggressive measures to isolate Qatar due to what they claim are concerns related to alleged funding of terrorist organizations.

In response, Lt. Col. Damien Pickart, spokesman for the U.S. Air Forces Central Command, reinforced the U.S. commitment to Qatar, saying, “The United States and the (anti-Islamic State, U.S.-led) coalition are grateful to the Qataris for their longstanding support of our presence and their enduring commitment to regional security.”

Nonetheless, the next day, Trump delivered an apparent about-face:

Qatar, located on a peninsula off the east coast of Saudi Arabia in the Persian Gulf, hosts the largest U.S. military base in the region, which serves as the staging ground for U.S. military actions against the so-called Islamic State. Around 11,000 U.S. troops and staff serve and live at Al-Udeid Air Base, and the U.S. Central Command for the entire Middle East operates from within the compound.

In April, Secretary of Defense James Mattis met with Qatar’s leader, Emir Tamim bin Hamad Al Thani, and reportedly “reinforced the importance of deepening the U.S.-Qatari strategic partnership” and “reiterated the value of the Qatari support to the counter-ISIS coalition as well as the country’s role in maintaining regional stability and security.”

During his visit to Saudi Arabia in May, Trump also met with the Qatar’s leader and said he would discuss the sale of “lots of beautiful military equipment” to the small nation.

Now, however, Trump is applauding Saudi Arabia for cutting off relations with Qatar.

Trump has previously described  Saudi Arabia as “the world’s biggest funder of terrorism,” and said the country “funnels our petro dollars, our very own money, to fund the terrorists that seek to destroy our people while the Saudis rely on us to protect them.”

During the presidential campaign, Trump called out Saudi Arabia for being the power behind the 9/11 terror attacks, saying, “Who blew up the World Trade Center? It wasn’t the Iraqis, it was Saudi — take a look at Saudi Arabia, open the documents.”

Yet now Trump appears to be going all-in with Saudi Arabia. The only thing that appears to have changed in the interim — besides the Saudi leaders appealing to Trump’s vanity with their praise and celebration — is a $110 billion arms deal approved by the State Department between the Kingdom and Trump during his visit.

Arms deal aside, there are American lives at risk. With his impulsive and reckless behavior, Trump endangered the well-being of the 11,000 U.S. military personnel on the base in Qatar.

In addition, while claiming his actions to be part of “the beginning of the end to the horror of terrorism,” Trump in fact undermined U.S. military efforts against terrorism by risking the status of the U.S. military base from which attacks on ISIS are staged.