Brenton Tarrant, the Australian man charged over the Christchurch mosque killings, has pleaded not guilty to 51 charges of murder.
In a hearing at the High Court in Christchurch, Mr Tarrant also pleaded not guilty via his lawyer to 40 charges of attempted murder and one charge of engaging in a terrorist act over the March killings.
It is the first time someone in New Zealand has been charged under the country's terrorism suppression act, which was introduced after the September 11 attacks.
The 28-year-old looked calm and composed as he appeared via video link from a high-security prison in Auckland.
On several occasions he appeared to smile or smirk, angering several people seated in the courtroom.
The main courtroom was packed with about 80 family members of those killed, along with those injured in the attack.
Overflow rooms were opened for members for the public wanting to view the proceedings.
A community member spoke to victims and families ahead of the hearing, urging them to draw strength from the holy month of Ramadan.
The trial has been set down for May 4 next year.
It is not clear at this stage what the 28-year-old's defence strategy will be, however, it is expected that a large number of witnesses will be called to appear in the trial.
There were reports that Mr Tarrant planned on defending himself in court, but he is still being represented by Auckland-based barristers Shane Tait and Jonathan Hudson.
Survivors and relatives outraged by plea
Outside the court, survivors were angry that Mr Tarrant had chosen to plead not guilty to all charges.
Abdul Aziz, who was hailed a hero after he confronted the gunman during the Linwood shootings, described Mr Tarrant as a "coward."
"It wasn't a good, pleasant thing to see. But it was important to be there and see his ugly face. It was very hard to look at him," he said outside the court.
Janna Ezat, whose son Hussein Al-Umari was killed at the Al Noor mosque, wept after learning Mr Tarrant will go to trial.
"Why did he say 'I'm not guilty?' Why? I am very upset...why does he have a right to play games with us, and say [he's] not guilty?" she said.
Didar Hossain, who lost an uncle and several friends, said he does not want to wait until May 2020 for the trial to begin.
"I am heartbroken. I lost my people. I lost my friends. Every Friday I go to [the mosque], they're not here. They're not with me," he said.
"I didn't get any hope here," he said of Friday's court proceedings.
On March 15, the gunman, armed with several high-powered weapons, opened fire on worshippers at two mosques during Friday prayers.
The attacks left 51 people dead, including several children.
The shootings were also live streamed on Facebook, with the video viewed more than 4,000 times before it was removed at the request of New Zealand police.
However, in the 24 hours after the attack, the social network also had to remove 1.5 million copies of the video from its platform.
Weapons legally obtained
Mr Tarrant was raised in Grafton in northern New South Wales, but was living in the New Zealand city of Dunedin for several months prior to the attack.
He is known to have visited Europe, South-East Asia and east Asia.
He had a gun licence that allowed him to legally obtain weapons and was a member of a local rifle club near Dunedin.
The 28-year-old was not known to Australian or New Zealand security authorities for violent extremism or serious criminal behaviour prior to the massacre.
Shooting prompts gun law overhaul
New Zealand Prime Minister Jacinda Ardern vowed to change the country's gun laws just days after the attack.
In April, Parliament voted to ban most semi-automatic firearms, parts that convert firearms into semi-automatic firearms, magazines over a certain capacity, and some shotguns.
Ms Ardern, who won praise for her handling of the shootings, urged the Parliament to vote on behalf of the victims of the Christchurch massacre.
"These weapons were designed to kill, and they were designed to maim and that is what they did on the 15th of March," she said.
Last month, she launched a global effort alongside French President Emmanuel Macron to eliminate violent content online.
Facebook responded by announcing it would suspend users who violate its rules from using the live streaming function.