DOHA, Qatar — Huddled in a makeshift operations center at a newly built compound in Doha, Qatari officials erupted in cheers last week as television screens showed a plane ferrying U.S. citizens take off from Kabul — the first since the U.S. left Afghanistan last month.
The campus of sand-colored villas in the Qatari capital was built as accommodations for the men's soccer World Cup next year. But these days it's housing some of the roughly 58,000 evacuees airlifted to Qatar in the chaotic final days of the Afghan War.
About 1,200 miles away in Taliban-held Kabul, Qatari technical teams got the tattered airport back up and running.
The jubilance in the operations center echoed the sense of relief and vindication coursing through Qatar, a tiny, extraordinarily wealthy country whose up-and-down relationship with the U.S. is enjoying a remarkable reversal of fortune.
"They saved our butts," said former Rep. Scott Taylor, R-Va., a former Navy SEAL who has been helping organize evacuee flights. "The reality is, more than any other nation per capita, Qatar stepped up to the plate."
Flash back to four summers ago, when the U.S. was blasting Qatar as a "high-level" funder of terrorism.
As a diplomatic crisis erupted in the Persian Gulf, the Trump administration cast Qatar as the aggressor, lending credibility to Saudi Arabia, the United Arab Emirates and their allies, who accused it of fomenting Islamist unrest throughout the region. Blockaded by its neighbors, Qatar resorted to airlifting cows from Europe to keep the milk flowing to its people, who number fewer than 400,000.
For some in the West, Qatar's reputation became that of a dubious ally that played all sides of the field, including turning a blind eye to extremism. Although it is home to the largest U.S. military base in the Middle East, Qatar for years has maintained ties to — and even hosted — groups like Hamas, the Muslim Brotherhood, Iranian officials and the Taliban.
"This is the role of a mediator," Assistant Foreign Minister Lolwah Rashid Mohammed Al-Khater said. "It's not to take sides. It's to maintain open channels with all parties, so that we can facilitate discussions, facilitate things like the evacuation."
Although U.S. politicians aiming to look tough on terrorism are quick to publicly bash Qatar, al-Khater said that behind the scenes, neither Republican nor Democratic administrations have asked it to cut off relations with any of the groups.
"Once any of them is in power, they actually continue the same strategy of encouraging us to continue playing that role," she said.
The approach, at least for now, appears to have paid off.
Qatar is at the center of just about every part of the U.S. response to Afghanistan's collapse. Not only have more U.S. and Afghan evacuees been flown to Doha than to any other way station, but the U.S. has also credited Qatar with helping get Americans safely to Kabul's airport. Qatar's ambassador in Afghanistan personally escorted U.S. citizens through Taliban checkpoints.
With the U.S. Embassy in Kabul shuttered, the new U.S. diplomatic mission to Afghanistan is based entirely in Doha, a modern city of sleek skyscrapers and luxury malls.
The decision by the U.S. to relocate its Afghanistan operations to Qatar was far from a coincidence. In the years after the U.S. invaded Afghanistan, the exiled Taliban maintained its political office in Doha, a neutral ground where U.S. and Taliban officials could hold limited interactions over the years, even as their military forces fought each other in Afghanistan.
Download the NBC News app for breaking news and politics
The new U.S. dependence on the gas-rich desert peninsula was stark this month when Qatar hosted two of the most senior U.S. leaders — Defense Secretary Lloyd Austin and Secretary of State Antony Blinken — at the same time, just days after the U.S. exit from Afghanistan was complete.
Blinken's first stop immediately after he landed: dinner with Qatar's leader, Emir Tamim bin Hamad al-Thani, who hosted him and Austin at his Sea Palace. The emir's fortresslike compound, topped with a giant purple-and-white Qatari flag, looks eastward over the Persian Gulf toward the United Arab Emirates, his country's occasional rival.
"Many countries have stepped up to help the evacuation and relocation efforts in Afghanistan, but no country has done more than Qatar," Blinken said the next day.
Al-Thani, tall, slim and at ease conversing in English, is a graduate of the U.K.'s prestigious Sandhurst military academy, whose alumni include Prince Harry and Jordan's King Abdullah II. He has been on the throne since 2013, and formal portraits of the emir and his father hang in government buildings and hotels across Qatar.
During the 2017 blockade, a new, stylized image began appearing on taxis and billboards and in social media depicting the emir bareheaded and strong-jawed above the words "Glorious Tamim" in Arabic calligraphy — an image that for many Qataris came to symbolize defiance against Saudi Arabia and its blockading allies.
Drawing on its exorbitant wealth, derived from the world's largest natural gas field, which it shares with Iran, Qatar has long sought to fashion itself as a major player in diplomacy, finance, sports and regional security —and to curry favor with both political parties in the U.S.
At its sparkling "Education City" in Doha, top U.S. universities like Georgetown, Northwestern and Carnegie Mellon have established satellite campuses — all paid for by Qatar. Next year's World Cup will bring athletes and spectators from around the world to Doha, despite allegations of corruption in Qatar's winning bid to host the games. Soccer's governing body, FIFA, and Qatar deny the allegations.
When the Persian Gulf crisis broke out in 2017, Qatar poured tens of millions of dollars into one of the most sprawling lobbying and public relations campaigns in Washington, aiming to repair its reputation.
Accused by the U.S. of being a "permissive jurisdiction" for terrorist financing, Qatar said it was taking steps to open its books, allowing Treasury Department officials into its central bank. And in 2018, Qatar paid for an expansion of Al Udeid Air Base that included more living quarters and recreational facilities for 10,000 U.S. personnel based there.
Yet America's nascent public reliance on Qatar could have implications for the delicate balance of power among U.S. allies and adversaries in the region, especially as the Biden administration defines its future relationships with countries like Iran, Turkey and Saudi Arabia, which have their own complicated histories with Qatar.
After years of stalemate in the Gulf diplomatic crisis, Saudi Arabia's interest in litigating the fight appeared to wane, and the blockade ended this year, before Biden took office.
Kristian Ulrichsen, a Gulf politics expert at Rice University's Baker Institute for Public Policy, said other regional countries, like the UAE, most likely envy the new bonhomie between the U.S. and Qatar, particularly given that President Joe Biden has signaled that the administration does not "see the Middle East and the Gulf as priorities."
"Some of the other Gulf states have found it difficult to engage, especially in areas where they perhaps hadn't made their presence felt in regional diplomacy" on Iran and other issues, Ulrichsen said. "So these were openings that were more on Qatar's terms anyway, given the regional politics of the last five years."