Take a drive in Doha, leaving behind the mirrored skyscrapers and palm-fringed avenues of this gas-rich city, and the protagonists of myriad conflicts are in easy reach.
In one western district, near the campuses hosting branches of American universities, Taliban officials and their families can be found window-shopping in the cavernous malls or ordering takeout meals from a popular Afghan eatery.
A few miles away at a vast United States military base with 9,000 American personnel, warplanes take off on missions to bomb the Islamic State in Iraq and Syria — and sometimes the Taliban in Afghanistan.
And an elderly Egyptian cleric, a fugitive from Cairo, is a popular fixture on the city’s swank social scene, and was recently spotted at a wedding by an American diplomat who was attending the same celebration.
This is the atmosphere of intrigue and opulence for which the capital of Qatar, a dust-blown backwater until a few decades ago, has become famous as the great freewheeling hub of the Middle East.
Against a backdrop of purring limousines and dhows moored in the bay, Doha has become home to an exotic array of fighters, financiers and ideologues, a neutral city with echoes of Vienna in the Cold War, or a Persian Gulf version of the fictional pirate bar in the “Star Wars” movies.
Yet that welcome-all attitude is precisely what has recently angered Qatar’s much larger neighbors and plunged the Middle East into one of its most dramatic diplomatic showdowns. For more than a month, four Arab countries have imposed a sweeping air, sea and land blockade against Qatar that, in a nutshell, boils down to a demand that Doha abandon its adventurist foreign policy, and that it stop giving shelter to such a broad range of agents in its capital.
So far, the blockade is not working, and the crisis looks set to worsen. Secretary of State Rex W. Tillerson flew back to Washington on Thursday after days of apparently fruitless shuttle diplomacy in the region. The foreign ministers of Germany, France and Britain have also intervened, without success.
The blockading nations — Saudi Arabia, Egypt, the United Arab Emirates and Bahrain — insist that Qatar is using an open-door policy to destabilize its neighbors. They say that Doha, rather than the benign meeting ground described by Qataris, is a city where terrorism is bankrolled, not battled against.
Qatar’s self-identity as a center of refuge dates to the 19th century, when its desolate and semilawless territory offered sanctuary to outlaws, pirates and people fleeing persecution across the Arabian Peninsula.
“It’s always been this place where waifs and strays and unwanted people ended up,” said David B. Roberts, the author of “Qatar: Securing the Global Ambitions of a City-State” and an assistant professor at King’s College in London. “There was no overarching power on the peninsula, so if you were wanted by a sheikh, you could escape to Qatar and nobody would bother you.”
In the 19th century, Qatar’s founding leader, Jassim bin Mohammed Al Thani, called it the “Kaaba of the dispossessed” — a reference to the revered black cube at the Great Mosque in Mecca, Islam’s holiest site, and a figurative way of describing Qatar as a lodestar for those seeking refuge.
That national trait turned into a policy for Al Thani’s descendants, who since the mid-1990s have thrown open Qatar’s doors to dissidents and exiles of every stripe. Doha has welcomed Saddam Hussein’s family, one of Osama bin Laden’s sons, the iconoclastic Indian painter M. F. Husain and the Chechen warlord Zelimkhan Yandarbiyev, who was assassinated in the city by Russian secret agents in 2004. (The agents were caught and later extradited to Russia.)
Qatar can afford to be generous. It shares the world’s third-largest gas field with Iran, yet has just 300,000 citizens, making it the richest country per capita. In recent decades, Doha has transformed into a gleaming metropolis of global ambition where luxury cars crowd the streets and world-renowned architects have traced its futuristic skyline. An army of imported laborers is building stadiums and subway lines for the 2022 World Cup.
But among fellow Arab states, Qatar’s image has been shaped by its contentious policy of come one, come all.
In Doha, wealthy Qataris and Western expatriates mingle with Syrian exiles, Sudanese commanders and Libyan Islamists, many of them funded by the Qatari state. The Qataris sometimes play peacemaker: Their diplomats brokered a peace deal in Lebanon in 2008 and negotiated the release of numerous hostages, including Peter Theo Curtis, an American journalist being held in Syria, in 2014.
But critics say that, often as not, rather than acting as a neutral peacemaker, Qatar takes sides in conflicts — helping oust Muammar el-Qaddafi in Libya in 2011, or turning a blind eye to wealthy citizens who funnel cash to extremist Islamist groups in Syria.
And what infuriates the Saudis, Emiratis, Egyptians and Bahrainis most of all is that Doha has also provided shelter to Islamist dissidents from their own countries — and given them a voice on the Qatar-owned television station, Al Jazeera.
The Egyptian cleric seen at a wedding recently, Sheik Yusuf al-Qaradawi, is a prominent booster for the Muslim Brotherhood and once had an influential show on Al Jazeera, where he dispensed teachings on matters from suicide bombings to personal sexuality.
“We have the ‘children bomb,’ and these human bombs must continue until liberation,” he told his audience in 2002.
Even though Mr. Qaradawi is now 91 and stopped his TV show four years ago, his presence in Qatar is an irritant for Egypt, and his name is featured prominently on a list of 59 people that the blockading countries want deported from Qatar. They have also demanded the closing of Al Jazeera.
This and many of the demands from the blockading countries are seen as impossibly broad, leading to widespread pessimism that the standoff will end anytime soon.
“The Emiratis and the Saudis seem to have miscalculated their position,” said Mehran Kamrava, the author of “Qatar: Small State, Big Politics” and a professor at the Georgetown University School of Foreign Service in Qatar. “They thought that if they went all-out with a blockade, the Qataris would balk. But they haven’t.”
Doha’s Taliban residents do not figure on the list of demands from the blockaders, but their presence does embody the wider debate around the merits of Qatar’s open-door approach.
Peace talks between the militants and Afghan officials, initiated by the United States in 2013, quickly collapsed. Yet a Taliban contingent stayed on, and Doha is now is home to about 100 Taliban officials and their relatives, who live comfortably at Qatari state expense, one Afghan official said.
There were further, unofficial talks in 2015 and 2016. But as the fight in Afghanistan grinds on, some experts question whether the supposed Taliban peace advocates might be quietly facilitating more war.
Michael Semple, a Taliban scholar at Queens University in Belfast, Northern Ireland, said that until the blockade, Taliban leaders in Qatar were known to frequently travel by road from Qatar, through Saudi Arabia, to the United Arab Emirates, where they have investments, and to fund-raise there among the Afghan communities in the cities of Sharjah and Dubai.
“Clearly they are using their foothold in the gulf to try and fund-raise and legitimize,” he said. “If they haven’t broached the substantive issues around peace, and the other gains are modest, then you could argue that that Qatar initiative makes things worse.”
In recent years, Doha has been home to Khaled Mishal, who stepped down this year as leader of Hamas, and the country provided the group a site for talks with the former British prime minister and Mideast peace envoy Tony Blair, in 2015.
Although former Secretary of State John F. Kerry publicly criticized the Hamas presence, American officials privately say they would prefer Hamas was based in Doha rather than in a hostile capital like Tehran.
In keeping with its open-door approach, Doha was home to an Israeli trade office from 1996 to 2008. Although relations have soured, Qatar promises that Israel will be allowed to participate in the 2022 World Cup.
In the current crisis, Qatar is leveraging the wide range of ties its foreign policy has fostered. Food supplies and a few dozen soldiers from Turkey arrived in Doha after the embargo started on June 5. Turkish news reports say the military contingent could swell to 1,000 troops, and President Recep Tayyip Erdogan is expected to visit Doha in the coming days.
Late one night last weekend, revelers were spilling from a trendy hotel nightclub in Doha as two athletic Turkish men checked in. Entering the elevator with their bags, they declared themselves glad to be in Doha, and described themselves as working in the “defense sector,” then with a smile declined to say any more.
Correction: July 17, 2017
An earlier version of this article misspelled the surname of the author of “Qatar: Securing the Global Ambitions of a City-State.” He is David B. Roberts, not David Robert.
This article has been republished from www.nytimes.com