He has been remanded in custody without a plea and is due to appear in court again on 5 April.

The presiding judge ruled that the suspect’s face should be pixellated in photographs and filming to preserve his fair trial rights.

Two others are in custody, but police say they do not believe they were connected to the attack. One had gone to help armed with a gun – and has been charged with firearms offences, Police Commissioner Mike Bush said.

An 18-year-old was also arrested but his involvement was said to be “tangential” and he would appear in court on Monday, he added.

None of those detained had a criminal record.

Fifty people are known to have been injured – two remain in a critical condition, said the police commissioner.

Brave interventions

Naeem Rashid, 50, and his 21-year-old son Talha had been living in New Zealand since 2010.

Mr Rashid has been hailed as a hero on social media after being seen in a video of the attacks apparently trying to tackle the gunman at Al Noor mosque before being shot.

His brother, in the northern Pakistani city of Abbottabad, told the BBC’s Secunder Kermani he was proud of his actions.

“He was a brave person,” Mr Alam said. “I’ve heard from people there… there were a few witnesses who said he saved a few lives by trying to stop that guy.”

But he went to add that even though his brother was being hailed as a hero by some people, it was “still a shock for us”.

“It’s our pride now, but still the loss – it’s like cutting your limb off really.”

Media playback is unsupported on your device

Mr Alam said he was angry.

“Terrorists don’t have a religion,” he said, adding “crazy people” had to be stopped.

At the other mosque attacked, in Linwood, a similar intervention occurred.

In the ensuing chase, the gunman dropped one of his weapons and went to fetch more from his car, when Mr Aziz tossed the gun towards him, smashing the car window.

The gunman then drove off and was arrested moments later.

Officials in New Zealand are now carrying out the difficult task of identifying those who died. They have shared a list of victims with families, but not released it publicly.

Some of the other victims were:

Sayyad Milne, 14, who wanted to be a footballer when he grew up

Daoud Nabi, 71, who is believed to have thrown himself in front of other people in the mosque to protect them

Khaled Mustafa, a refugee from the war in Syria

Hosne Ara, 42, killed while searching for her husband who uses a wheelchair – he survived

How events unfolded

The first report of an attack came from the Al Noor mosque in central Christchurch during Friday prayers at 13:40 (00:40 GMT).

A gunman drove to the mosque, parked nearby and began firing into the mosque as he walked in through the front entrance. He fired on men, women and children inside for about five minutes. He live-streamed the attack from a head-mounted camera and identified himself in the footage.

The suspect is then said to have driven about 5km (three miles) to another mosque in the suburb of Linwood where the second shooting occurred.

Ms Ardern said the guns used by the attacker appeared to have been modified, and that the suspect’s car was full of weapons, suggesting “his intention to continue with his attack”.

He had obtained a gun licence in November 2017 that allowed him to buy the weapons used in the attack.

Media playback is unsupported on your device

New Zealand’s Attorney General David Parker said the government would look into banning semi-automatic weapons, but that no final decision had been made. Previous attempts to tighten gun laws in a country with a strong gun lobby and culture of hunting have failed.

The suspect had not been on the radar of security services in New Zealand or Australia.

‘A rejection of hate’

Rupert Wingfield-Hayes, BBC News, Christchurch

All day on Saturday, the people of Christchurch turned out to show their rejection of the hate that inspired Friday’s horrific attacks.

At one point a group of young men started quietly singing a traditional Maori song, their heads bowed, eyes closed.

Media playback is unsupported on your device

The mayor of Christchurch said the killer had come to the city with hate in his heart, to perform an act of terrorism. But she said he did not represent anything about the city.

Still, there are lots of uncomfortable questions for the authorities here. The man now in custody, Brenton Tarrant, made no secret of his support for white supremacy. He had reportedly been planning the attacks for months. And yet he was not on any police watch list. He did not have any trouble getting a gun licence, nor in buying a collection of high-powered weapons.

Suspect’s message

Before the attacks, social media accounts in the name of Brenton Tarrant were used to post a lengthy, racist document in which the author identified the mosques that were later attacked.

The text is called The Great Replacement, a phrase that originated in France and has become a rallying cry for European anti-immigration extremists. The man said he had begun planning an attack after visiting Europe in 2017 and being angered by events there.

Muslims make up about 1.1% of New Zealand’s population of 4.25 million, according to the latest census figures. Numbers have risen sharply since the 1990s as the country took in refugees from various war-torn countries.