To the rest of the world, New Zealand’s reaction to the Christchurch massacre has been extraordinary. The killing of 50 people at Friday prayers in two mosques by a white, right-wing Australian has united, rather than divided, this small country and galvanised a parliament that has been prevaricating on gun reform for 30 years into action.

Much of that response has been down to the leadership of Jacinda Ardern. But even there, the public reception has been remarkable.

Decisions that in another political context could have seemed controversial, like wearing a hijab to meet with members of the Christchurch Muslim community who were directly affected by the shooting, and introducing strong gun reform within six days, have been welcomed as respectful and appropriate.

Even those who voted for the opposition have praised Ardern’s leadership. So is New Zealand’s civilised response to a tragedy just down to good stewardship, or is there something else going on?

The people’s prime minister

At a press conference after the shooting, Ardern offered two rallying cries. “This is not us,” in reference to the shooting, and “They are us,” in reference to the Muslim community. Within hours those messages were written on cardboard hearts left at memorials by schoolchildren, plastered across the Twitter profiles of right-wing contrarians (in one case replacing a photo with alt-right figure Jordan Peterson) and adopted almost universally by local media.

As well as a message of unity, Ardern has said that New Zealand needs to examine elements of racism and far-right extremism in its society. She told the Australian television show The Project that she had been “very deliberate” in her language surrounding the attack.

“This was a terrorist attack,” she said. “This was a targeted attack against the Muslim community of New Zealand ... and we as a nation reject violent extremism in all its forms.”

On the streets of Christchurch, questions about Ardern’s leadership are met with: “I’m so proud of her. Aren’t you proud of her?”

Neal Curtis, a senior lecturer in media and communications at the University of Auckland, says the country followed Ardern’s lead.

“Because she was doing stuff practically to change things people could actually mourn and grieve because they knew someone was getting on and doing stuff,” he says. “With the ‘thoughts and prayers’ bullshit in the US, people can’t actually grieve because in the back of their head they are thinking: ‘Oh, I have got to start some kind of protest group to get people to ban guns.’ ”

Attempts by lobby groups to derail the NZ gun reforms have been rebuffed by both sides of politics.

Judith Collins, a member of the conservative New Zealand National party and former police minister, publicly told the NRA to “bugger off”.

Unlike the US, where the gun ownership debate is rights-based, gun laws in New Zealand is a practical issue centred around hunting and farming. There is no justification in that context for assault rifles, and some farmers handed in their firearms before the law changed.

Many New Zealanders, Curtis says, didn’t even know that assault rifles were readily available. For farmers and hunters, Ardern eased the way by not banning the kind of lower calibre and low-capacity semi-automatic firearms they regularly use.

The media picture

New Zealand media largely heeded the request of police not to use footage of the attack, and instead focused on mourning the victims. The following Friday, journalists and anchors of nightly news bulletins marked the one week anniversary by delivering the news wearing hijabs.

Before the attack, Curtis says, explicit racism and Islamophobia in New Zealand media had been limited to a few conservative columnists and bloggers. Fear-mongering about refugees, particularly Muslim refugees, was not regularly front-page news.

He attributes this in part to the lack of Murdoch-owned press in NZ, and in part to the small size of the Muslim population.

“It is not like the situation in the UK or even in Australia where you have got these regular front pages where people are just bombarded with fear-mongering about immigrants and refugees, and especially Muslims,” Curtis says. “Murdoch, for a start, doesn’t have a significant presence here in terms of newspapers and [he] is the main man behind that in the UK and Australia … so I think the ownership situation is important.”

Racist political rhetoric has in recent years been targeted toward Chinese and southeast Asian populations, including a dogwhistling campaign by Ardern’s party in 2015 around foreign real estate ownership.

But, Curtis says, most New Zealanders also consume a lot of international media and are exposed to the “rampant Islamophobia” of global media as well as soft-balled coverage of right-wing figures. Peterson’s speaking tour last month was sold out. Bookstore Whitcoulls pulled his book from shelves in the days after the attack but had replaced them within 10 days.

Social media also allows easy access to the more extreme white supremacist narratives subscribed to by the alleged gunman. And those narratives, says Curtis, have been tacitly ignored in a country where the racism, like the footwear, is largely casual.

An embarrassed nation

The strength of the unified national response to Christchurch will depend on how those conversations about racism are managed, the political commentator Bryce Edwards says.

“There will be people that react badly to those conversations, and they are hard conversations to have in a sense and they are not always carried out in a productive and constructive way,” he says.

Some of these conversations were already happening. The cumulative impact of a nation where many people are “a little bit racist” was already the focus of a campaign by the Hollywood director Taika Waititi.

Racism is part of the colonial fabric of New Zealand, but it has done more than countries like Australia to reckon with that colonial past and shape itself as bicultural and, increasingly, bilingual. That cross-cultural response was seen in response to the attack.

Māori have made it clear they stand in solidarity with Muslims. Ngāi Tahu, the principal iwi of the South Island, opened its marae (meeting ground) in Christchurch for those wishing to mourn and Māori students led a haka at community vigils.

Edwards says shock over what has occurred, combined with grief and shame and a kind of small-c conservatism that makes New Zealanders “more British than the British”, had “overwhelmed a lot of the politics”.

“New Zealanders were actually quite embarrassed by what happened,” he says. “It’s quite a big challenge to our self-identity.

“We see ourselves as a progressive country and an inclusive one. People do feel a great sense of shame that internationally we might be associated with hatred and racism.”

Kiwis also “don’t talk about politics, religion and sex”, he says.

“But just because we’re not saying it outright doesn’t mean it’s not there.”

• This article was amended on 1 April 2019 to correct a misspelling of the family name of Taika Waititi as Waitiki.