Twenty-four hours after a gunman rampaged through two mosques in the South Island city of Christchurch, attention was turning to why this quiet, provincial enclave became the target for New Zealand’s deadliest extremist attack – and what lured the suspect to drive more than 350km north from his home in Dunedin to carry out the attack.

There is dissonance too in the benign atmosphere of Christchurch, “the garden city”, and the grotesque horror that unfolded on Friday afternoon. It was for a long time described as “the most English city outside of England”, with its quaint gardens and picturesque gothic revival architecture. Named after Christ Church, Oxford, the city is bisected by the river Avon and in its centre stood, until the devastating 2011 earthquake, the commanding Christchurch Cathedral. The pace of life is slow, the people modest.

Paul Buchanan, a security analyst at the 36th Parallel consultancy, said between 1% and 2% of Christchurch’s 340,000 inhabitants were Muslim. He said the close proximity of the two mosques (just 5.5km apart), their large size and lack of security made them a “soft target”.

“The election of Donald Trump has emboldened the alt-right around the world, and New Zealand is no exception to that.

“The alt-right in this country has been invigorated over the last few years and part of that has to do with the fact they weren’t under the scrutiny of the security services that the Muslim community was.”

In the years since the 2011 Christchurch earthquake, which left 185 people dead and the quaint cathedral city in ruins, the authorities paused the region’s refugee resettlement programme while they attempted to rebuild the city centre.

During the same years, Christchurch lost 20,000 people from its population – residents who no longer saw a future for themselves in the city. Mental health issues, domestic violence and substance abuse rates have soared.

Last year, with large parts of the city functioning again, Christchurch once again began operating as a refugee resettlement centre, welcoming people from Syria in large numbers, some of whom were believed to be among the dead in Friday’s attack.

The Jacinda Ardern government has doubled the country’s annual quota of refugees from 750 a year to 1,500, with those from Syria making up the bulk of arrivals. The refugees were actively courted by provincial cities in the South Island with low, ageing populations, including Dunedin, where the suspect in the attacks lived, and Christchurch, where the massacres unfolded.

People leave messages and flowers outside Christchurch’s Botanic Gardens in tribute to the victims of the mosque mass shootings. Photograph: Fiona Goodall/Getty Images

Suddenly hijabs and prayer caps appeared in greater numbers in cities with overwhelmingly homogenous ethnically European populations.

Prof Robert Patman, an expert in foreign affairs at Otago University, said that while many questions remained, the size of Christchurch’s Muslim population, which is larger than Dunedin’s, could have made it a target.

He said New Zealand’s reputation as a peace-loving nation could also have been a factor in the planning.

“New Zealand stands for everything these people hate. It is a beautiful country, it puts a big emphasis on inclusion. It’s not perfect but it’s working hard to improve its race relations. And there’s a lot of tolerance here, it’s diverse and friendly.

“And from their point of view if they can pull off a big event in a country that has been relatively untouched by terrorism – that would be regarded as a notch in their belt.”

Patman said the suspect might have wanted to divide Christchurch and the country.

But as Cantabrians – as locals of the Canterbury region are referred to – keep repeating to each other and their Muslim friends, ultimately the plan failed, because “they are us and we are them”.

“Their [the alt-right’s] narrative is the western world and the Muslim world can’t coexist. Christchurch is showing them that is utterly wrong,” Patman said.

Instead of a city that is easy to divide, Christchurch has proved calm and united in the immediate wake of the attack.

At Christchurch hospital, where many members of the Muslim community spent Saturday waiting for news of loved ones, members of the public turned up offering car lifts around town, food parcels and hot drinks, or just a friendly face to talk too.

“New Zealanders love us,” said one man at the hospital, an Afghan refugee and survivor of the attack. “And we love them.”

On the streets Kiwis use subtle shorthand to check on each other’s welfare – a brief head nod, a quick meeting of the eyes and a small smile. “All good?” they say.

At the memorial that has sprung up on Deans Avenue, the location of the first mosque shooting, displays of emotion are more overt. Locals have formed circles, linking their arms around each others shoulders and singing waiata (Māori songs), laying bouquets of flowers handpicked from Christchurch gardens – hydrangeas, roses and lilies – and crying openly in public – a rarity in this country.

“Kia kaha,” people say to each other, which in Māori means “stay strong”.

• Crisis support services can be reached 24 hours a day. In New Zealand, the crisis support service Lifeline can be reached on 0800 543 354. In Australia, Lifeline is 13 11 14. In the UK and Irish Republic, contact Samaritans on 116 123. In the US, the National Suicide Prevention Lifeline is 1-800-273-8255. Other international helplines can be found at www.befrienders.org.