(Bloomberg Opinion) -- This week’s visit to Washington by the Emir of Qatar, Sheikh Tamim bin Hamad Al Thani, including an appointment with President Donald Trump at the White House, is the latest performance of the most delicate high-wire act in international politics.

Isolated by its neighbors, Qatar is improbably balancing friendships with the three contesting powers in the Middle East: the U.S., Turkey and Iran. In a Venn diagram of Middle Eastern strategic relationships, Qatar would account for most of the heavily shaded areas.

It's being boycotted by Egypt and three of its Gulf Arab neighbors — Saudi Arabia, the United Arab Emirates and Bahrain — which accuse the tiny emirate of sponsoring extremist groups, including the Muslim Brotherhood.

The boycott hasn't changed Qatar’s policies, but it has made it rely more on the support of regional powers. And while the U.S., Turkey and Iran all offer crucial forms of support, Qatar is also striving to offer up crucial benefits in return.

The key relationship for Qatar’s security is with Washington. That partnership is centered on the al-Udeid Air Base in Qatar, which hosts 10,000 U.S. troops and the forward operating headquarters of U.S. Central Command.

Al-Udeid has the only regional runways capable of handling B-52 bombers, which means there aren't any obvious alternatives nearby. Moreover, the Qataris were so keen on bringing the U.S. military into their country for their own security that they not only financed and constructed the base, they essentially gave the U.S. extraterritorial jurisdiction over it, allowing it to function almost as sovereign U.S. territory.

The U.A.E. has encouraged the U.S. to relocate its Central Command headquarters there, but there's no chance the Emiratis would agree to such extraordinary terms.

Since the boycott began in the summer of 2017, Qatar has been agreeing to virtually everything Washington has asked of it, ranging from agreements on curbing terrorism financing to capitulating on a civil aviation dispute, agreeing to massive new contracts for U.S. military and commercial goods and services and upgrading and expanding the air base.

Moreover, Qatar has been trying to frame its good relations with radical groups as an asset for the U.S., even as other Gulf states complain about them. With Israel's encouragement, it has been providing Hamas with cash payments on a quarterly basis to meet payroll in Gaza. And it recently hosted what might prove to be a breakthrough negotiation between the Taliban and members of the Afghan government.

During his Washington trip, the Qatari leader reportedly offered to be a go-between with Iran but said the U.S. didn't appear interested since it wants to apply further sanctions on a country it regards as a rogue state.

Since the boycott began, Qatar has failed to get the U.S. to intervene on its behalf, but has successfully consolidated its relationship with Washington.

This has occurred despite a spike in tensions between the U.S. and Qatar's other major partner, Turkey. Turkey’s efforts to purchase Russian S-400 missiles are only a symptom of a deeper rift with the U.S. as Turkey begins to try to assert itself as a major Middle Eastern power.

The irony is that Qatar is Turkey's main partner in this effort, since the two countries are the founding members of a coalition that primarily backs Sunni Islamist groups, particularly the Muslim Brotherhood. Thus far, the U.S. has preferred to ignore this aspect of Qatar’s regional agenda, but if Turkey continues its regional ascent, that might not continue.

The contradiction is even stronger with the third major Middle East power, Iran, with which Qatar must maintain good relations. Almost all its income comes from a natural gas field it shares with Iran. And since the boycott, it has depended on Iranian airspace overflight rights to keep its airline viable and itself widely internationally accessible.

Despite the boycott, Qatar was included in Gulf, Arab League and Islamic “emergency meetings” that Saudi Arabia organized on May 30 as the confrontation with Iran boiled over. The Qataris seemed to go along with a joint statement criticizing Iran’s regional policies, which suggested potential progress in healing the Gulf Arab rift.

But the next day, Doha stepped away from many of the criticisms of Iran, underscoring the divisions with its neighbors. But it certainly must have mollified Tehran.

So while Qatar works hard to provide its American and Turkish partners and Iranian friends with what they need, and has been able to balance these delicate relationships, there isn't much of a net under the tightrope. If any two of Doha’s three senior partners ever come to blows, Qatar may experience a long, hard fall.

To contact the author of this story: Hussein Ibish at hussein.ibish@gmail.com

To contact the editor responsible for this story: Jonathan Landman at jlandman4@bloomberg.net

This column does not necessarily reflect the opinion of the editorial board or Bloomberg LP and its owners.

Hussein Ibish is a senior resident scholar at the Arab Gulf States Institute in Washington.

©2019 Bloomberg L.P.