New Pew research on global attitudes confirms that religious fundamentalism is a threat to gay, lesbian, bisexual and transgender people. The group asked the populations of 39 countries “should society accept homosexuality?” According to Pew:

“The survey finds that acceptance of homosexuality is particularly widespread in countries where religion is less central in people’s lives. These are also among the richest countries in the world. In contrast, in poorer countries with high levels of religiosity, few believe homosexuality should be accepted by society.”

One can look at the treatment of homosexuals in any given country and determine whether the place is a success or failure.

First, in countries where LGBT people are marginalized they are coerced into marrying the opposite sex. This automatically decimates the lives of the gay population and the spouses who unwittingly marry them. Such widespread misery and dysfunction is bound to have negative ripple effects throughout society.

Second, in every instance where societies are open, gay people form relationships and communities. If gay people are not free – the nation is most likely a repressive state where all citizens are deprived of liberty. You simply do not find thriving democracies, healthy economies, and a free press in places where LGBT citizens are persecuted.

Third, when gay people are kept down it is usually justified by religious beliefs. This signifies that a country values magic over medicine and superstition over science. The result is an aversion to education, a stifling of creativity, and the rewarding of conformity, all of which undermine innovation and economic output.

Finally, it is clear that LGBT people are routinely used as scapegoats by dictators and tyrants. They do so to bolster the moral credentials of their odious and corrupt regimes. If the masses are distracted by the “threat” of LGBT people – you can almost guarantee that the nation’s leaders are engaged in untoward activity. This rule applies not only to gay people, but to all minorities who are targeted to create a diversion from official malfeasance.

Of course, the real menace to civilization is not LGBT people – but religious fundamentalism that suffocates democratic impulses, strangles burgeoning freedom, and ignites sectarian violence. It is almost impossible for rulers of such countries to share power and promote peace — because they believe God anointed them and an enemy is always needed to deflect the ineluctable fact that religious zealotry leads to economic, institutional and cultural failure.

We can see this ugly transformation in Turkey, where Islamic Prime Minister Recep Tayyip Erdogan is chipping away at the secular state. This includes imposing new restrictions on alcohol and attempting to consolidate power by extending his term in office. Such dictatorial behavior has led to growing protests, while the increasingly totalitarian Erdogan blames Twitter.

“Now we have a menace that is called Twitter,” Erdogan said. “The best examples of lies can be found there. To me, social media is the worst menace to society.”

This comment alone should keep Turkey out of the European Union. How can the world’s leading information economies allow an EU member state that disdains the free dissemination of information?

The predictably man-made disaster of sectarianism is about to explode in Syria, where the US is being implored to choose sides between the Shiite-dominated Party of God (Hezbollah) and the Sunni-backed Al Nursa Front (an offshoot of Al Qaeda). According to the New York Times, Sunni fighters are calling the Shiites “filth” and “dogs.” Rebel commanders have begun to refer to Hezbollah the “party of the devil.

One reason the Shiites are fiercely defending Damascus is because the Sunni’s supposedly kidnapped Muhammad’s granddaughter, Sayida Zeinab, following a 7th Century battle. After they murdered her, she was buried under a gold-domed shrine.

“Damascus did not fall because Syida Zeinab is there,” said Kamel Wazne, the founder of the Center for American Strategic Studies. “They will not allow Zeinab to be captured twice.”

I’m sure Syida was a lovely girl. But how many marines are we willing to see come home in flagged draped coffins to defend her holy bones? Can military aid bring a decent outcome to a place with primitive thinking that is still consumed by a 7th Century conflict?

When fundamentalists in the United States work to remake America into a Christian nation, I have to wonder what they are thinking. They already have peaceful lives, exist in a modern country where their children have a future, and possess freedom to worship and lead thoroughly observant lives. Will they not be satisfied until they throw all these advantages away so we can be more like Turkey or Syria?

In theocratic scenarios, gay people are the always the first casualties – but never the last. Fundamentalist states and free people never co-exist. The sooner the world figures this out, the quicker genuine and lasting peace will come.

Wayne Besen is a columnist and author of the book “Anything But Straight: Unmasking the Scandals and Lies Behind the Ex-Gay Myth.”