The video shows a bearded imam purportedly heralding a plan by Justin Trudeau to implement sharia law in Canada, before cutting to an image of the prime minister sitting cross-legged in prayer amid a group of Muslim men.

Shared widely on anti-Trudeau Facebook pages earlier this year, the clumsy montage was presented as evidence that Canada’s 23rd prime minister is bent on subverting the judicial system to please Islamists – probably because he is a closeted Muslim himself.

Trudeau was pilloried when images emerged of at least three instances in which he had donned blackface. Yet as Canada heads toward a general election, the prime minister has also become the subject of racist and Islamophobic conspiracy theories.

And unlike the 2016 US election – in which a significant portion of online misinformation was created on Russian troll farms – much of the anti-Muslim propaganda aimed at Trudeau is produced and disseminated by Canadians.

The video of the YouTube imam, for example, was uploaded by a prominent Ontario anti-Muslim activist, and then viewed, shared and liked on at least three anti-Trudeau Facebook pages with a collective reach exceeding 185,000.

Dozens of videos on these pages are a conspiratorial pastiche in which Trudeau coddles Muslim extremists and throws open Canada’s borders at the behest of George Soros. And they have been clicked almost 700,000 times.

The eddies of such online outrage sometimes spread into the real world. At a town hall meeting in January, an audience member accused Trudeau of supporting Sharia law – before intimating that he should be hanged for treason.

Recent polling suggests many Canadians are a politely jingoistic bunch who are inclined to believe that immigrants in general, and Muslims in particular, are too numerous above the 49th parallel. Illustration: Guardian Design/The Guardian

More recently, the Conservative party candidate Cameron Ogilvie stepped down after the activist group Press Progress unearthed social media posts in which Ogilvie shared a post accusing Trudeau of wanting to turn Canada into an “Islamic state”.

Such conspiracies date back to Trudeau’s 2015 campaign pledge to bring in 25,000 mostly Muslim refugees from war-torn Syria by the end of the year.

The move was a dramatic reversal from the previous Conservative government, which only agreed to increase the number of Syrian refugees admitted into Canada, from 1,300 to 10,000, provided Syria’s non-Muslim religious and ethnic minorities were prioritized.

Soon after, the anti-Trudeau conspiracies began in earnest, echoing US “birthers” who alleged Barack Obama was ineligible for office or was secretly a Muslim.

By early 2016, a Toronto-based Facebook group was already speculating that Trudeau wanted to flood Canada’s borders with immigrants from majority Muslim countries, either because he was ignorant to the dangers of radical Islam – or because he was a radical Islamist himself.

“The best non-confidence statement,” one site member opined, would be for Trudeau to be shot. Neither the conspiracy-mongering nor the threats have hampered the site’s popularity. In 2016, it had 25,000 followers. Today it has nearly 235,000.

The conspiracies only heightened when the Liberals introduced a non-binding motion condemning “Islamophobia and all forms of systemic racism and religious discrimination” – a move which Trudeau’s opponents on the fringe right were convinced was proof of his government’s fealty to radical Islam.

Liberal MP Iqra Khalid, the motion’s sponsor, was inundated with hate mail and death threats. Meanwhile, Canada’s statistical agency, found that police-reported hate crime targeting Muslims increased by 151% in 2017.

Now Muslim groups found themselves in a unique situation: criticizing both Trudeau for donning brownface, as well as his enemies on the far right who say he is secretly Muslim.

‘Mislabeling someone as Muslim to castigate them is despicable. It engages in a longstanding hateful mythology about the Muslim community.’ Illustration: Guardian Design/The Guardian

“It was disheartening to see the prime minister engage in blackface/brownface,” said Mustafa Farooq, Executive Director of the National Council of Canadian Muslims. “That said, mislabelling someone as Muslim to castigate them is despicable. It engages in a longstanding hateful mythology about the Muslim community.”

That Canadians should be the source of this should not be a surprise: contrary to prevailing stereotypes, recent polling suggests many Canadians are a politely jingoistic bunch who are inclined to believe that immigrants in general, and Muslims in particular, are too numerous above the 49th parallel.

One poll,found 41% of Canadians believe there are too many immigrants in the country – and more than 60% of self-described Conservatives say there are too many visible minorities here.

Many of the far right’s most prominent provocateurs are Canadians, including Faith Goldy, Stefan Molyneux and Lauren Southern – who was banned from Facebook earlier this year.

A 2018 report by the country’s intelligence agency found that Canadians who hold extreme rightwing views – including Islamophobia, anti-immigration and white nationalism – actively use chat forums and social media.

“These individuals leverage online chats and forums in attempt to create an online culture of fear, hatred and mistrust by exploiting real or imagined concerns,” the report found.

“We strongly expect much of this kind of content to be domestic,” said Taylor Owen, director of the Digital Democracy Project, which is monitoring instances of mis- and disinformation ahead of the election. “As in the EU parliamentary elections, domestic groups saw the tools and tactics which worked for Russia in the US election and simply co-opted them.”

All of this has kept fact-checkers busy. The CBC, the country’s public broadcaster, has devoted seven journalists to fact check stories, ads, posts and other media that could have an impact on the election.

Earlier this year, the Agence France-Presse news agency debunked a widely circulated story which said the Trudeau government had “pleaded” the Nigerian government to send one million immigrants to Canada. (The same site had Trudeau making similar requests of six other countries.)

Canada’s prime minister, Justin Trudeau, makes an election campaign stop in Surrey, British Columbia, on 24 September. Photograph: Jennifer Gauthier/Reuters

Yet the tide of anti-Muslim, anti-immigrant rhetoric persists, seemingly spurring the nativist impulses of some mainstream Canadian politicians.

In Quebec, Canada’s second-most populous province, the government led by the populist Coalition Avenir Québec has reduced the number of incoming immigrants by 20%, despite the province’s aging population and corresponding labour shortage.

The CAQ also passed a “laicity” law banning religious symbols from the bodies of certain government workers, which many see as disproportionately affecting Muslim women in the workplace.

Last fall, the former Conservative MP Maxime Bernier launched a populist party that will field a full slate of candidates in the upcoming election.

Bernier regularly berates Trudeau’s “cult of diversity”, wants to “make Canada great again” and shares videos from advocates of the baseless “QAnon” conspiracy theory that Donald Trump is battling a global cabal of elite liberal paedophiles.

Bernier recently made the evidence-free claim that Islamic extremists have infiltrated Canadian politics, a contention pushed by one of the largest anti-Trudeau sites in the country.

In less than a year, his thinly concealed dog-whistling has attracted notorious white nationalists and Canada’s alt-right movement – as well as 5% of Canadian voters, according to one poll.