After Donald Trump’s travel ban went into effect, Justin Trudeau addressed refugees on Twitter: ‘Canadians will welcome you, regardless of your faith. Diversity is our strength.’ The next day a man opened fire in a mosque in Quebec City, murdering six people and injuring 19 just after the evening prayer. According to initial media reports, which later proved mistaken, there were two shooters, one of them Muslim, who allegedly entered the mosque shouting ‘Allahu akbar’ – as if only Muslims could commit this sort of crime. That's presumably why the White House press secretary, Sean Spicer, mystifyingly claimed that the Quebec attack justified Trump’s anti-Muslim policies. The Muslim ‘suspect’, it later turned out, was trying to help the victims. The man charged with the crime, Alexandre Bissonnette, a 27-year-old French-Canadian, is a fan of Donald Trump and Marine le Pen. He apparently wanted to signal that, despite Trudeau’s messages, Muslims are as unwelcome in Canada as in the US.

From a middle-class suburb and family in Quebec City, Bissonnette studied political science at Université Laval (one of Quebec’s main universities). He played chess, worked at a blood bank, and had no previous police record. The current consensus is that he became somehow radicalised over the last year: from moderate conservative to right-wing extremist. No ties to political organisations have yet emerged; his activism seems to have been limited to online comments deriding women and Muslims.

Some of Bissonnette’s political views have wider currency in Canada. Stephen Harper, Trudeau’s conservative predecessor, declared ‘Islamicism’ the greatest threat to Canada, outlawed the niqab at citizenship ceremonies, and intervened to slow the admission of Syrian refugees.

More fingers point at Quebec’s sovereigntist movement and the Parti Québécois. Is this fair? Quebec has a population of eight million, of whom about 300,000 are Muslim. In 2007, Hérouxville, an all-white village of 1300 residents, adopted a code of conduct for (imaginary) immigrants that welcomed them as long as they didn’t stone or burn women or perform genital mutilation. A year later a government commission, led by the philosopher Charles Taylor and the sociologist Gérard Bouchard, reassured the province that the cultural practices of immigrants didn’t threaten Quebec’s identity. Unfounded fears, stoked by sensationalist media, had inflated alleged tensions. During Ramadan last year, a pig’s head with a note wishing ‘bon appétit’ was left in front of the mosque where the recent attack took place.

The sovereigntist movement was forged in the 1960s, in the wake of the so-called Révolution tranquille. It rests on three pillars: political independence, French language and state-sponsored secularism. In the quiet revolution, Quebeckers removed the Catholic Church from politics, the education system, and often also from their lives. The secularism that Quebec embraced, modelled on French laïcité, is openly critical of Canadian multiculturalism. In private you can practise whatever potentially divisive religion you like, but in public you’re a citoyen. In 2013, the Parti Québécois minority government tried to enforce a Charter of Values that would have banned state employees, from daycare teachers to government officials, from wearing ostentatious religious symbols: kippahs, turbans, veils. Religious groups organised protests, and multiculturalists criticised the project on philosophical grounds. It was put to rest after the Parti Québécois lost the 2014 provincial elections.

Critics of the Parti Québécois accuse it of launching the divisive Charter to exploit French Quebeckers' longstanding fears about their identity, driving a needless wedge into Quebec society that has contributed to the Islamophobic climate in which the attack on the mosque occurred.

The defeat of the Parti Québécois in the 2014 provincial election and of the Conservative Party in the 2015 general election left anti-Muslim sentiment without an official political platform. Trudeau’s immigration policies (and photo-ops with Syrian refugee children) may have reinforced resentment in some circles – resentment that is now being ‘disinhibited’ (to use Charles Taylor’s term) as the Bannon-Trump agenda is enacted in the US.

The mosque massacre undermined whatever political goals the attacker may have had. It united politicians of all parties and Canadians across the country in condemning the crime and reaffirming diversity, inclusiveness and tolerance as fundamental Canadian values. In the long run, what’s needed is a self-critical effort to make sense of what happened and of the tensions in Canadian society that contributed to it.