Australian Brenton Tarrant, 28, appeared in the dock in a white prison shirt and handcuffs.
He is the main suspect in the mosque shootings that killed 49 people in New Zealand on Friday has appeared in court on a single murder charge.
Further charges are expected to be made against him.
PM Jacinda Ardern said Mr Tarrant had five guns and a firearms licence, adding: “Our gun laws will change.”
Two others are in custody.
None of those detained had a criminal record.
Mr Brenton Tarrant was remanded in custody without plea and is due appear in court again on 5 April.
Speaking at a news conference on Saturday, Ms Ardern said that 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”.
The prime minister also spoke about the importance of reuniting relatives with their loved ones “as quickly as possible”, and said that bodies were still being removed from the Al Noor mosque – the site of the first attack.
She added that financial support would be made available to those who had lost someone on whom they were financially dependent.
The first victim of Friday’s attack has been named by his family as Daoud Nabi, 71, who moved to New Zealand from Afghanistan in the 1980s.
The identities of the other victims have not yet been released.
A total of 48 people were wounded in the shootings. Among those injured are two young boys – aged two and 13.
Eleven of those being treated at Christchurch Hospital are in a critical condition in intensive care, chief of surgery Greg Robertson said.
Bangladesh, India and Indonesia all say some of their citizens were killed in the shooting and others are unaccounted for.
On Saturday, Christchurch Mayor Lianne Dalziel expressed “revulsion” at this “act of terrorism” and voiced solidarity with the victims.
“We have welcomed new people into our city. They are our friends, they are our neighbours,” she told reporters. “We want to come together to support them.”
She added that flags would fly at half-mast on government buildings in the city “until further notice”.
Security remains tight across Christchurch.
All mosques in New Zealand have been closed.
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 front door, entered and fired on worshippers for about five minutes.
The gunman, who live-streamed the attack from a head-mounted camera, identified himself as Brenton Tarrant in the footage, which showed him shooting at men, women and children.
The gunman is then said to have driven about 5km (three miles) to another mosque in the suburb of Linwood where the second shooting occurred.
One witness described how one of the worshippers had managed to disarm the man, who ran to a waiting car outside.
It is not clear where the arrests were made.
Police say they recovered firearms from both mosques, and explosive devices were found in a car belonging to one of the suspects.
According to the latest census figures, Muslims make up about 1.1% of New Zealand’s population of 4.25 million.
Numbers rose sharply as New Zealand took in refugees from various war-torn countries since the 1990s.
The main suspect
The main suspect had “travelled around the world with sporadic periods of time spent in New Zealand”, Prime Minister Ardern told reporters.
“I would not describe him as a long-term resident,” she said, without formally identifying him.
“The offender was in possession of a gun licence. I’m advised that this was acquired in November of 2017,” Ms Ardern said.
She said New Zealand intelligence services had been stepping up investigations into far-right extremists, but added: “The individual charged with murder had not come to the attention of the intelligence community nor the police for extremism.”
What is known about the suspects?
In the wake of Saturday’s 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 man says he began planning an attack after visiting Europe in 2017 and being angered by events there.
The document is called “The Great Replacement” – a phrase that originated in France and has become a rallying cry for European anti-immigration extremists.
What are New Zealand’s gun laws?
The minimum legal age to own a gun in New Zealand is 16, or 18 for military-style semi-automatic weapons.
All gun-owners must have a licence, but most individual weapons do not have to be registered – New Zealand is one of the few countries where this is the case.
Applicants for a firearm licence must pass a background check of criminal and medical records, including factors such as mental health and domestic violence.
Once a licence has been issued, gun-owners can buy as many weapons as they want.