We don’t know much about the upbringing of Omar Mateen, the gunman who killed 50 people at an Orlando gay nightclub and pledged allegiance to the Islamic State. But we do know, for whatever it’s worth, that his parents were born and raised in Afghanistan, which has an atrocious position on gay rights — just like too many places in the Middle East and Africa do. Could this have contributed to how he viewed the world?

In countries like Yemen, Sudan, Iran, Nigeria and Saudi Arabia, homosexuality is punishable by death. In a number of other countries, including Afghanistan and Syria, it’s against the law. And what do they have in common? Many are Muslim countries, legislating their own versions of sharia law. Their populations number into the hundreds of millions.

It’s pretty obvious that radical Islamists like the followers of ISIS, al-Qaida and Boko Haram are socially regressive with negative views of women and the LGBT community. But if you study the laws and mores of broader Islamic society, it becomes pretty clear the problem isn’t just in radical pockets. Too many countries are plagued with intolerance.

And some people raised in these societies, who are taught to believe such laws are just and normal, come to North America. These countries are basically exporting homophobia to the West.

While the Islamic State has made being gay punishable by death in the regions of Syria under their control, even before ISIS rose to prominence you could be sent to prison for being gay. And this is the country from which Canada recently fast-tracked 25,000 refugees.

This doesn’t mean we shouldn’t admit refugees from this country. After all, many people apply to come to Canada because they prefer our values and laws to the ones they’re leaving behind. This is how, for example, the tolerant and liberal-minded Iranian-Canadians I know feel. But this isn’t going to be the case with every new arrival to Canada. Each year we bring in tens of thousands of people to Canada from countries that have viciously homophobic laws and standards.

It’s an important reminder that we need to teach new arrivals our values lest they don’t share them. Canadians pride themselves on being tolerant, but it shouldn’t extend to the point where we’re tolerant of intolerance.