US President Donald Trump has been attacked by his ubiquitous critics for his apparent about-face on the crisis surrounding Qatar.In a Twitter post on Tuesday, Trump sided firmly with Saudi Arabia, Egypt, the United Arab Emirates and the other Sunni states that cut diplomatic ties with Qatar and instituted an air and land blockade of the sheikhdom on Monday.On Wednesday, Trump said that he hopes to mediate the dispute, more or less parroting the lines adopted by the State Department and the Pentagon which his Twitter posts disputed the day before.To understand the apparent turnaround and why it is both understandable and probably not an about-face, it is important to understand the forces at play and the stakes involved in the Sunni Arab world’s showdown with Doha.Arguably, Qatar’s role in undermining the stability of the Islamic world has been second only to Iran’s.Beginning in the 1995, after the Pars gas field was discovered and quickly rendered Qatar the wealthiest state in the world, the Qatari regime set about undermining the Sunni regimes of the Arab world by among other things, waging a propaganda war against them and against their US ally and by massively funding terrorism.The Qatari regime established Al Jazeera in 1996. Despite its frequent denials, the regime has kept tight control on Al Jazeera’s messaging. That messaging has been unchanging since the network’s founding. The pan-Arab satellite station which reaches hundreds of millions of households in the region and worldwide, opposes the US’s allies in the Sunni Arab world. It supports the Muslim Brotherhood and every terrorist group spawned by it. It supports Iran and Hezbollah.Al Jazeera is viciously anti-Israel and anti-Jewish.It serves as a propaganda arm not only of al-Qaida and Hezbollah but of Hamas, Islamic Jihad and any other group that attacks the US, Israel, Europe and other Western targets.Al Jazeera’s reporters have accompanied Hamas and Taliban forces in their wars against Israel and the US. After Israel released Hezbollah arch-terrorist Samir Kuntar from prison in exchange for the bodies of two IDF reservists, Al Jazeera’s Beirut bureau hosted an on-air party in his honor.Al Jazeera was at the forefront of the propaganda campaign inciting against then-Egyptian president Hosni Mubarak in 2011 and against Libyan leader Muammar Gaddafi in 2012. Its operations were widely credited with inciting their overthrow and installing in their places regimes controlled by the Muslim Brotherhood and other jihadist groups.As for the Qatari regime itself, it has massively financed jihadist groups for more than 20 years. Qatar is a major bankroller not only of al-Qaida and Hamas but of militias associated with ISIS in Iraq and Syria. In a State Department cable from 2009 published by WikiLeaks, US diplomats referred to Qatar as the largest funder of terrorism in the world.According to the Financial Times, the straw that broke the camel’s back for the Saudis and their allies was their discovery that in April, Qatar paid Iran, its Iraqi militias and al-Qaida forces in Syria up to a billion dollars to free members of the royal family held captive in southern Iraq and 50 terrorists held captive in Syria.Given Qatar’s destabilizing and pernicious role in the region and worldwide in everything related to terrorism funding and incitement, Trump’s statement on Tuesday in support of the Sunnis against Qatar was entirely reasonable. What can the US do other than stand by its allies as they seek to coerce Qatar to end its destabilizing and dangerous practices? The case for supporting the Saudis, Egyptians, the UAE and the others against Qatar becomes all the more overwhelming given their demands. The Sunnis are demanding that Qatar ditch its strategic alliance with Iran. They demand that Qatar end its financial support for terrorist groups and they demand that Qatar expel terrorists from its territory.If Qatar is forced to abide by these demands, its abandonment of Iran in particular will constitute the single largest blow the regime in Tehran has absorbed in recent memory. Among other things, Qatar serves as Iran’s banker and diplomatic proxy.If the story began and ended here, then Trump’s anti-Qatari stance would have been the obvious and only move. Unfortunately, the situation is not at all simple.First there is the problem of Doha’s relations with key Americans and American institutions.Ahead of the 2016 US elections, WikiLeaks published documents which disclosed that the emir of Qatar presented Bill Clinton with a $1 million check for the Clinton Foundation as a gift for his 65th birthday. During Hillary Clinton’s tenure as secretary of state, Qatar reportedly contributed some $6m. to the Clinton Foundation.Clinton, for her part, was deeply supportive of the regime and of Al Jazeera. For instance, in testimony before the Senate Foreign Relations Committee in 2011, Clinton praised Al Jazeera for its leading role in fomenting and expanding the protests in Egypt that brought down Mubarak.Clinton wasn’t the only one that Qatar singled out for generosity. Since the 1990s, Qatar has invested hundreds of millions of dollars in US universities. Six major US universities have campuses in Doha.Then there is the Brookings Institution. The premier US think tank had a revolving door relationship with the Obama and Clinton administrations.In 2014, The New York Times reported that Brookings, which opened a branch in Doha in 2002, had received millions of dollars in contributions from Qatar. In 2013 alone, the Qatari regime contributed $14.8 million to Brookings.Not surprisingly, Brookings’ scholars supported the overthrow of Mubarak, and supported the Muslim Brotherhood regime during its year in power. Brookings scholars urged the Obama administration to cut off military assistance to Egypt after the military overthrew the Muslim Brotherhood in 2013.Brookings scholars have similarly written sympathetically of Qatar and its ally Turkey. As the Investigative Project on Terrorism revealed in a four-part series on Brookings’ relations with Qatar in 2014, Brookings’ scholars ignored human rights abuses by Qatar and praised Turkey’s Erdogan regime as behaving like the US in enabling religion to have a role in public life.It is likely that given then-president Barack Obama’s strategic goal of reorienting US Middle East policy away from its traditional Sunni allies and Israel toward Iran and its allies in Qatar and Turkey, that Brookings, Clinton and other beneficiaries of Qatar’s generosity were simply knocking on an open door. Indeed, in 2014, during Operation Protective Edge, the Obama administration’s alliance with Qatar, Turkey and Iran against Sunnis and Israel came out of the shadows.During the Hamas war with Israel, Obama sought to dislodge Egypt from its traditional role as mediator between Israel and Hamas and replace it with Qatar and Turkey. For their part, both regimes, which fund and support Hamas, accepted all of Hamas’s cease-fire demands against Israel and Egypt. As their partner, the Obama administration also supported Hamas’s demands.Had Egypt and Israel bowed to those demands, Hamas would have achieved a strategic victory in its war against Israel and Egypt. To avoid buckling to US pressure, Egypt built a coalition with the same states that are now leading the charge against Qatar – Saudi Arabia and the UAE – and openly supported Israel.In 2014, the standoff between the two sides caused the war to end in a draw. Hamas was not dismantled, but it failed to secure Israeli or Egyptian acceptance of any of its demands for open borders and access to the international banking system.Given that Trump is not aligned with Brookings, the Clinton Foundation or US academia, it could be argued that he is not beholden to Qatari money in any way.But unfortunately, the Clintons, Brookings and US universities are not the only American beneficiaries of Qatari largesse.There is also the Pentagon.In the 1990s, Qatar spent more than $1b. constructing the Al Udeid Air Base outside of Doha.It is the most sophisticated air force base in the region. In 2003, the base replaced Saudi Arabia’s Prince Sultan Air Base as headquarters for the US military’s Central Command. Since 2003, all US operations in Iraq, Afghanistan and Syria are controlled from the base.Following Trump’s Twitter postings, the Pentagon was quick to say that operations at Al Udeid base had not been influenced by the crisis between Qatar and its neighbors. The Pentagon spokesman refused to say whether or not Qatar sponsors terrorism.Instead, Capt. Chris Davis stated, “I consider them a host to our very important base at Al Udeid.” He commended Qatar for hosting US forces and for its “enduring commitment to regional security.”Also on Tuesday, according to the Egyptian media, Iran deployed Revolutionary Guard Corps forces to Doha to protect the emir and his palace.On Wednesday, Turkey’s parliament voted to empower Erdogan to deploy forces to Qatar to protect the regime.The moves by Qatar’s allies Iran and Turkey significantly raise the stakes in the contest of wills now at play between Qatar and its Sunni neighbors and adversaries.With Iranian forces guarding the palace and the emir, the possibility of a bloodless coup inside the Al Thani family has been significantly diminished.Any move against the emir will raise the prospect of an open war with Iran.So, too, if Egypt and Saudi Arabia invade or otherwise attack Qatar, with or without US support, the US risks seeing its Arab allies at war with its NATO ally Turkey.Under the circumstances, Trump’s refusal to endorse Article 5 of the NATO treaty during his speech last month in Brussels appears wise and well-considered.Article 5 states that an attack against one NATO ally represents an attack against all NATO allies.With the Pentagon dependent on the Qatari base, and with no clear path for unseating the emir through war or coup without risking a much larger and more dangerous conflict, the only clear option is a negotiated resolution.Under the circumstances, the best option for the US to openly work towards is to diminish Qatar’s regional profile and financial support for Iran and its terrorist allies and proxies. Hence, Trump’s announcement on Wednesday that he will mediate the conflict.As for the medium and long term, Trump's statement on Twitter remains the best, indeed, the only game to play.