Muslims exchange greetings after performing Eid al-Adha prayer at Abdul Wahhab Mosque in Doha, Qatar, in 2014. (Enes Kanli/Anadolu Agency via Getty Images)

Gary Wasserman’s book on his time in Qatar, “The Doha Experiment: Arab Kingdom, Catholic College, Jewish Teacher,” will be published this fall.

The Qatar I lived in for eight years is unrecognizable from the television ads running in Washington. In these Saudi-sponsored spots, Trump administration officials denounce Qatar’s aid to terrorists while fires burn in the background. This is a harsh and largely unfair judgment of the peaceful, globalist city-state I knew.

Qatar is a wealthy, militarily weak mini-state in an unusually dangerous neighborhood, and yet it has prudently pursued a foreign policy designed to avoid making enemies — of being “friends to everybody.” This has clearly included quiet support for groups such as the Muslim Brotherhood and likely radical jihadists that many would label terrorists. But it has also meant hosting the enormous Al Udeid Air Base, the regional headquarters of the U.S. Central Command housing more than 10,000 Americans in comfort and safety. And the U.S. military was welcomed in Qatar after being pressured to leave Saudi Arabia. Even now, the U.S. military does not express alarm about its hosts’ alleged ties to terrorists.

Qatar itself has pursued liberal globalization with a vengeance, a pursuit that meshes with Western values far more than with its fundamentalist neighbors. Leaving aside its vast investments in Western economies, Qatar’s public policies have aimed to make it a respected global citizen.

In foreign policy, Qatar has stressed humanitarian aid, including $100 million to American victims of Hurricane Katrina; it has offered its service as a mediator in regional conflicts from Eritrea to Gaza; it has provided refuge for exiles and dissidents espousing a wide range of opinions in politics and religion. American officials have often welcomed the presence of antagonists in Doha where they can be readily monitored.

Even on the ever-toxic topic of Israel, Qatar invited Israeli leader Shimon Peres to speak in Doha, encouraged a Georgetown University-organized student trip to Israel, welcomed Israeli athletes and, before being pressured by its neighbors to close it in 2009, hosted an Israeli trade mission in Doha.

Domestically, Qatar has embraced U.S. higher education by inviting six American universities — Northwestern, Carnegie Mellon, Weill Cornell Medicine, Texas A&M, Virginia Commonwealth and Georgetown — to locate overseas branches in the multibillion-dollar campus called Education City. These schools operate with their own faculty and administrators, with complete academic freedom, and under their own university standards. And despite the fact that most students are not citizens of Qatar, these universities are fully and generously financed by their host.

Qatar is a country where women drive their own cars, attend co-educational classes and serve at high levels of the government as well as the broader society. Increasingly, Qatari women are better educated and better prepared for their professions than their male counterparts.

Qatar created, subsidized and protected the media network Al Jazeera, the most widely watched news channel in the Arab world. It is trusted because Qatar has allowed it unprecedented freedom for the region to report the news of the world, including airtime for dissidents, for Israelis and for critics of autocratic regimes. Its role in the Arab Spring made it the go-to source for honest coverage of the demonstrations and uprisings. Not surprisingly, shutting down Al Jazeera has been a key demand of the Arab states now aligned against Qatar.

In his far-from-uncritical study, “Qatar: A Modern History,” Professor Allen J. Fromherz described Qatar as “a forum for independent thought in the Middle East.” While criticism of the ruling family is not tolerated, there is an environment of open debate as well as of religious tolerance. Qatar, for one, has not followed its Sunni neighbors in raising the level of sectarian hostility between Sunnis and Shiites.

This impulse to become a forum for pressing international issues has sometimes made Qatar resemble a Quaker meeting on steroids. The annual Doha Interfaith Conference has brought together Muslim, Christian and Jewish leaders about a dozen times; UCLA’s Enriching the Middle East’s Economic Future Conference has met annually in Doha for the last decade; Qatar hosted the U.N. Climate Change Conference in 2012; and my own school, Georgetown University, hosts hundreds of high school students from around the world at a Model United Nations every year. Qatar has spent billions of dollars on the recently opened Sidra Medical Center for world-class research devoted to women’s and children’s health issues.

Unlike the ruling family in Saudi Arabia constrained by its alliance with Wahhabi clerics, Qatari rulers have determinedly pushed their traditional society toward globalization and westernization. If allowed, they will continue to do so.