The unspeakable atrocity in Orlando last Sunday has opened the floodgates to a torrent of heated discussion about the reasons behind America’s deadliest mass shooting.

Depending on where people place themselves on the political spectrum, the causes are either the continuing lack of effective gun control in the U.S., the malignant spread of radical Islamic terror, or the seemingly never-ending fear and loathing of the LGBT community.

The reality is, all these elements are contributing factors. And the toxic mix has led to a horrific explosion in which more than 100 innocent people were killed or wounded.

There is no doubt that mass murderer Omar Mateen was influenced throughout his life by the views of his Afghan-born Muslim father, who posted a video on Facebook after the attack, saying, “God will punish those involved in homosexuality.” The only problem that Seddique Mir Mateen seemed to have with his son’s vile act was that Omar took the initiative, rather than leaving the fate of those at the Pulse nightclub up to Allah.

Not long before Mateen opened fire and then called 911 to pledge allegiance to the Islamic State, I finished writing the following article detailing the countless obscene assaults on women and gay men in Europe by Muslim immigrants, and warning of what could happen in this country.

And although Omar Mateen was American-born, his devotion to the twisted extremist Islamic view of homosexuality must be regarded as a key element in both his apparent self-loathing and his fatal decision to mercilessly end the lives of everyone he saw celebrating love and life and diversity.

Here, then, are my pre-Orlando thoughts, all the more relevant now:

It is, perhaps, the ultimate example of locking the barn door after the horse has run away. One million migrants and refugees were allowed into Germany in 2015, and now, the German government has released a smartphone app instructing the new residents, the vast majority of whom are Muslim, on how to behave.

Called “Ankommen,” or “Arrival,” the app addresses some of the basics, such as helpful phrases, finding a doctor who speaks Arabic, and how to look for jobs. Then it gets to the good stuff. A section on “social interactions with women” cautions, “A woman may talk to men and dance and laugh with them, but that does not automatically mean that she is interested in anything more than that” and “Short skirts, high-heeled shoes, and make-up are most often worn for fashion reasons. Men must not misinterpret a woman’s clothing style as an invitation.”

Elsewhere, the app shows a photo of a man with his arm around another man’s shoulder, and his head bent affectionately towards him, under the title “We are all equal.” But in an apparent surrender to Muslim sensitivities, there are no references to gays or lesbians.

Also in Germany, authorities have handed out 20,000 leaflets at public pools and refugee facilities, featuring cartoon drawings with messages warning against “verbal and sexual harassment of women wearing bikinis.”

These desperate and wholly ineffective efforts would be laughable if they were not linked to the kind of disgraceful assaults we’ve seen in Europe in recent months by Muslim “asylum-seekers.” The cartoon leaflets were issued after multiple reports of gangs of migrants groping women in public swimming pools. Three Syrian teenagers were arrested in Munich for attacking two schoolgirls at a public pool, and in response to that incident, plus another assault by an 18-year-old refugee on a 54-year-old woman, a leisure center in the city of Bornheim has banned migrants from entering.

But those incidents pale in comparison to the stunning mass rapes and brutal sexual assaults that took place in Cologne during New Year’s Eve celebrations. More than 500 women in that and three other German cities filed complaints about the violence with police, and nearly all of the suspects identified so far are young Muslim men from Syria, Iraq, and Afghanistan.

None of this comes as a surprise to anyone who’s been paying attention. In fact, a leaked German government document obtained by the newspaper Die Welt noted, “We are importing Islamic extremism, Arab anti-Semitism, national and ethnic conflicts of other peoples, as well as a different understanding of society and law. German security agencies are unable to deal with these imported security problems.”

And the LGBT community is especially at risk. In the western German city of Dortmund, three young Arabic-speaking men from North Africa allegedly propositioned two women, but upon discovering they were transgender, the Muslims attacked the pair with stones from a nearby gravel bed. A Dortmund police official quoted the suspects as saying “such persons must be stoned.”

One of the victims, speaking later on German TV, said, “They are barbarians. In 2016, in Germany, they are stoning women?!”

Germany, with nearly six million Muslims now within its borders, is Ground Zero for what’s been called the “Islamization of Europe.” Over in Sweden, however, which began accepting Muslim immigrants in the 1970s, two Muslims from Morocco were recently charged with torturing and murdering a gay man, then dressing the body in women’s clothes and wrapping a snake around his neck for good measure. Police say a cellphone video from one of the assailants shows him cursing the victim for being homosexual. Sweden has gained a reputation as the “rape capital of the Western world,” with nearly 78 percent of the crimes committed by “foreigners,” a code word generally used to indicate Muslims. As long ago as 1996, a report from the Swedish Council for Crime Prevention found that Muslim immigrants were 23 times more likely to commit rape than Swedish men.

These are all instances of Muslim asylum-seekers attacking residents of the countries that generously offered them safe haven. But a new investigation by the Associated Press finds that gay migrants in asylum shelters are being persecuted by their fellow Muslims in alarming numbers, with “scores of documented cases in the Netherlands, Germany, Spain, Denmark, Sweden, and Finland.”

The incidents range from verbal abuse to physical attacks with knives and fists. At a refugee center in Sweden, a Muslim asylum-seeker spit in the face of a gay fellow refugee, choked him, then kicked him unconscious, later telling police he was “outraged that Sweden protects homosexuality, and all (gays) should be killed by slaughtering.”

In Germany, anti-gay abuse has gotten so extreme in migrant centers that separate shelters for LGBT asylum-seekers have been created in both Berlin and Nuremberg. Given the reluctance of LGBT victims to report the crimes, gay rights groups assume there have been many more assaults than the hundreds which have been officially documented.

These are just a few of the myriad examples of atrocities committed by migrants from the backwards Muslim countries of the Middle East, North Africa, and southeast Asia in recent years. European officials, afraid of being labeled racist and Islamophobic, have done little to recognize and deal with the increasing peril.

And what will happen when this intense, Islam-based hostility to LGBT people bursts out of the migrant centers into the mainstream population? One shudders to imagine what these gay-bashing migrants will do to residents of civilized societies in which people openly celebrate their sexuality.

So what does this all mean for the U.S. and its policies towards Muslim migrants? As an immigrant to this country myself, I am not unaffected by the plight of innocent people trying to escape war and oppression. But I came here because I respected the traditions and democratic values of America. As a gay Jewish man from Eastern Europe, these concepts spoke to me.

We can expect no such respect or behavior from people who come from Muslim societies which are not just intolerant of but aggressively hateful towards LGBT people; from a tradition that degrades women, celebrates “honor killings” of rape victims, and endorses genital mutilation; from a mindset that views Jews as “the descendants of apes and pigs”; and from a worldview that allows the murder of non-believers who won’t convert to Islam.

Apologists for dysfunctional Muslim societies claim that only a small minority of Muslims are so extreme. But that is simply not true. A 2013 Pew Research Center study of Muslims around the world who believe that “Sharia” law is the revealed word of Allah reveals facts such as these: 86% in Egypt agree that those who abandon Islam should be killed; 89% in Pakistan say adulterers should be stoned; 76% in the Palestinian territories support punishments such as cutting off the hands of thieves.

I was born in the Soviet Union, and after the collapse of Communism there was much post-mortem analysis of the evils and moral bankruptcy of that system of government. But let us not forget that decades earlier, many in the American intelligentsia supported the ideal of a “Communist utopia.” These days, many in Western academia speak of a fantasy world in which Islam is a religion of peace, calling Islamic-based terrorism and violence “aberrations.” They are as deluded now as their fellow intellectuals were in the past.

We in the LGBT community have fought long and hard to feel safe in our homes, jobs, and in the street. American blacks, Jews, and feminists have worked and sacrificed to achieve equality, increase diversity, and end discrimination against minorities and women. And yet, many in those communities do not comprehend the danger of allowing into this country huge numbers of people who are diametrically opposed to all the enlightened values America has come to represent.

There is no easy answer to the refugee crisis, but one possibility is for the rest of the world to ramp up pressure on the oil-rich Gulf states to take in their co-religionists. The Muslim teens who murdered the gay man in Sweden would feel at home in Saudi Arabia, where homosexuality is punishable by death, and the North Africans who stoned the transgender women would fit well in any Muslim country where stoning is an appropriate penalty for such a “crime.”

One cannot change hearts, minds, and behavior with a catchy app or a cartoon leaflet. Our American military power did not convince Iraqis to adopt democracy, and the “Arab Spring,” supported by the West, failed miserably to bring any improvements to that region. And here in the U.S., we must be fully aware of the consequences if we willingly open our doors to those who remain deeply attached to a culture of hatred and intolerance.