“Never again,” Norwegian politicians pledged, after the terrorist attacks perpetrated by rightwing extremist Anders Breivik on July 22 2011, the worst in the nation’s history. Yet just last month, an armed 21-year-old Norwegian, Philip Manshaus, stormed into a mosque in Bærum outside Oslo and opened fire, his actions inspired apparently by Breivik as well as recent terror incidents in New Zealand and El Paso.

Norway is generally portrayed in the international media as a haven of peace, prosperity, happiness and equality. So why has it produced so much violent rightwing extremism in the past decade?

In order to understand the phenomenon, we need to return to the many unacknowledged faultlines in the political and popular response to the terror of July 2011.

Faced with the horror that unfolded that day at both government headquarters in Oslo and on the island of Utøya, Norway’s then prime minister, Jens Stoltenberg, responded by defining the events as attacks on “all Norwegians” and on “Norwegian democracy” itself.

He was wrong. These attacks were not attacks on all Norwegians nor on Norwegian democracy: Breivik was attacking Norwegian social democrats and members of the social democrats’ youth wing. He singled out these groups because he blamed successive Labour governments for policies allowing Muslims to settle in Norway.

Much of what was published about Breivik in the aftermath of the 2011 attacks, which left 77 people dead, had the practical effect of exceptionalising Breivik, his racism and extremism. It is a feature of Norwegian self-understanding that racism is always something happening somewhere else and at other times. The reality is that terrorism in modern Norwegian history has overwhelmingly been perpetrated by rightwing extremists. The commission of inquiry into the events of 22 July delivered a devastating report on the many institutional failures relating to the atrocity, but its report by and large reduced the matter to technicalities.

The memorial and learning centre, Utøya, Norway, scene of Anders Breivik’s 2011 atrocity. Photograph: Are Carlsen/Blakstad Haffner Arkitekter

Norwegian Muslims enjoyed a grace period from hate after the 2011 attacks, but it was shortlived. Norwegian media editors, mostly privileged, white, male and middle-class, saw little reason for any substantial change and continued to push the idea that the solution to far-right hate speech was more and freer speech, and provided ever more prominent media platforms to far-right actors.

The populist rightwing Progress party, of which Breivik had been a member before he self-radicalised online, entered the Norwegian government for the first time in an alliance with the Conservative party after the parliamentary elections of September 2013.

The party had campaigned on an anti-immigration and anti-Muslim platform since 1987. The new strategic political alliance handed Progress full control over Norwegian immigration and integration policy; the Conservative party controlled economic policies. Unprecedented income-tax reductions for Norway’s corporate billionaire elite, rising socio-economic inequality and an asylum policy that pushed the limits of the permissible under international law quickly ensued.

Among the angriest are groups of young white Norwegian men unable to cope with their perception of a loss of privilege

Norway now found itself with cabinet ministers in important portfolios who had long pushed far-right rhetoric about a “stealth Islamisation” of the country, who had “wondered aloud” on social media about the supposed “need for a crusade” against Muslims and endorsed analogies between Islam and Nazism. Some even exhorted European governments to simply let migrants and refugees drown in the Mediterranean, and linked Norwegian social democrats to the Salafi-jihadist terrorists of Islamic State in their rhetoric.

The far-right Oslo-based Human Rights Service (HRS) and its director Hege Storhaug got a vast increase in their annual allocation from the state budget even though Storhaug and the HRS have long pushed analogies between Islam and Nazism and spread far-right “Eurabia” conspiracy theories . In a bestselling 2015 self-published book lavishly covered by Norwegian media and translated into several languages, Storhaug declared Norwegians to be in a “civilisational war against Muslims”.

Storhaug’s HRS also obtained the right to nominate board members to the Immigration Appeals Board , which adjudicates on asylum applications in Norway. Norwegian corporate billionaires supportive of the government started funding far-right “alternative media”. Fearful of antagonising Progress party and Conservative party voters who have more negative attitudes towards Muslims than any other groups of voters, Norway’s Conservative prime minister Erna Solberg has cultivated a calculated ambiguity when confronted with the anti-Muslim rhetoric of her Progress party allies.

To its credit, the government has also funded a Centre For The Study of Extremism (C-Rex) at the University of Oslo. But C-Rex has no designated role in active terrorism prevention. The government introduced an action plan against radicalisation and violent extremism in 2012, but senior police officers working in counter-extremism and radicalisation have told me that at senior government level there has been little interest in anything but Norwegian Muslim IS sympathisers.

In 2017, six years after Breivik, the Norwegian police security services, PST, made the extraordinary claim that Norway had not “been struck by … rightwing extremist terrorism to the same extent as …other European countries”.

In its annual threat assessment for 2019, the PST declared that a rightwing extremist terrorist attack in Norway in 2019 was “very unlikely”.

This had to be hastily updated following the mosque shooting with a PST warning that a rightwing extremist terror attack “in the coming year” is indeed a possibility.

The hate against Muslims that motivated both Breivik and Manshaus is to a large extent generated in the online and international netherworld of rightwing extremism and white supremacy. Pankaj Mishra was indeed justified in observing that we live in an “age of anger”.

Among the angriest are small groups of young white Norwegian men seemingly unable to cope with their perception of a loss of privilege to women and immigrants. But the background mood music of hatred against Muslims in Norway goes far wider than that. According to surveys, 34% of Norwegians have strongly negative attitudes towards Muslims; 31% subscribe to a version of the “Eurabia” theory.

Yet, Norwegian academics wanting to conduct research on racism in Norway (other than antisemitism) after 2011 have found their calls for funding falling on deaf ears. The government has initiated two action plans against antisemitism since 2013, but has so far been adamantly opposed to similar measures to combat Islamophobia. Norway’s first ever research project on Islamophobia obtained funding only in 2018.

Regional elections on 8 and 9 September were again framed by the Progress party as being about immigration, integration and Muslims. But for the first time since 1987, this backfired, and the rightwing government suffered a severe beating, losing ground to a red, green and centrist rural political wave.

In an interview after the Bærum mosque shooting, the mosque’s Irfan Mushtaq pleaded for “a government that stands up to hatred against Muslims, and does so in actions and not only words”.

After appeasing and instrumentalising hatred for years, perhaps the Norwegian government is finally getting this message from the voters.

• Sindre Bangstad is a social anthropologist and the author of Anders Breivik and the Rise of Islamophobia