The suspect in the attack on two mosques in Christchurch opened fire on worshippers using rifles covered in white-supremacist graffiti after listening to a song glorifying a Bosnian Serb war criminal.

The gunman, who identified himself as Brenton Tarrant, a 28-year-old born in Australia, streamed footage live on social media before and during the massacre, in which 49 people died. It showed him driving to the first mosque while listening to a song idolising Radovan Karadžić, who was jailed for genocide and other war crimes against Bosnian Muslims.

Two of the rifles used in the shooting referenced Ebba Akerlund, an 11-year-old girl killed in April 2017 when an Uzbek man, Rakhmat Akilov, rammed his truck into people in Stockholm.

The name Charles Martel, who is hailed by white supremacists for defeating an invading Muslim force at the Battle of Tours in 732, was also displayed on weapons used in the attack.

A 74-page “manifesto” Tarrant posted online lists various neofascist aims, including the creation of an atmosphere of fear among Muslims.

Tarrant, believed to be from the New South Wales city of Grafton, espouses far-right and anti-immigrant ideology in the document. He claims he had brief contact with the Norwegian mass murderer Anders Breivik, who gave his blessing to the attack.

Police have not confirmed that Tarrant is one of the people in custody over the shooting. They say one man has been charged.

Australia’s prime minister, Scott Morrison, confirmed that a citizen had been arrested in New Zealand, and said he had been briefed on the document, describing it as “a work of hate”.

In the document, called “the great replacement”, Tarrant describes himself as a “regular white man from a regular family” who “decided to take a stand to ensure a future for my people”. He said he wanted his attack on the mosques to send a message that “nowhere in the world is safe”.

The document says his parents are of “Scottish, Irish and English stock” and that he was born into a “working class, low-income family”. When he was young, he was “a communist, then an anarchist and finally a libertarian before coming to be an eco-fascist”, he says.

According to ABC News, Tarrant worked as a personal trainer at a gym in Grafton between 2009 and 2011, then went travelling after making money on Bitconnect, a cryptocurrency.

“He was a very dedicated personal trainer. He worked in our programme that offered free training to kids in the community, and he was very passionate about that,” Tracey Gray, the manager of the Big River gym, told the Australian TV network.

Play Video 2:19 Mass shooting at two Christchurch mosques – video report

The document says the attack was planned for two years and that although New Zealand was not the original choice of location, Christchurch was scoped out three months in advance.

“I only arrived to New Zealand to live temporarily whilst I planned and trained, but I soon found out that New Zealand was as target rich of an environment as anywhere else in the west,” it says.

“I chose firearms for the effect it would have on social discourse, the extra media coverage they would provide and the effect it could have on the politics of the United States and thereby the political situation of the world,” it says.

In Grafton, residents struggled to understand the radicalisation of a young man from an unremarkable regional town. Tarrant’s mother, a teacher, was said to be afraid and had changed her name on social media profiles.

“I think they’d known he’d gone a bit odd, but does anyone really expect that to happen, ever?” said one woman who did not want to be named. “It’s not the sort of thing you want your town to be known for. This is the sort of place where if you didn’t know him, you’d know someone who did, at least if you’ve lived here long enough. It’s just shocked everyone.”

Tarrant’s father died of cancer aged 49 when his son was still at school, according to ABC News. Tarrant is believed to have a sister.

At the town’s Clocktower Hotel, people described Tarrant as an unremarkable student who was well-regarded as a personal trainer after leaving Grafton high school in 2009.

Sally, who was in the same school year as Tarrant’s sister, said: “I don’t remember much about him but definitely knew who he was. He was just not really out there, not political in any way, or at least we couldn’t tell whether he was. It seemed like he was into the gym more than anything.

“He stayed a few years after high school and then went travelling.”

Others said Tarrant returned to Grafton briefly in 2017 and left the same year.

• 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.