At least 49 people were killed in mass shootings at two mosques full of worshippers attending Friday prayers in an attack broadcast in horrifying, live video by an immigrant-hating white nationalist wielding at least two assault rifles and a shotgun.
One man was arrested and charged with murder, and two other armed suspects were taken into custody while police tried to determine what role they played.
"It is clear that this can now only be described as a terrorist attack," Prime Minister Jacinda Ardern said, noting that many of the victims could be migrants or refugees.
She pronounced it "one of New Zealand's darkest days."
The cold-blooded attack shocked people across the nation of 5 million people, a country that has relatively loose gun laws but few gun homicides and is so peaceful police officers rarely carry firearms. It is also generally considered to be welcoming to migrants and refugees.
The gunman behind at least one of the mosque shootings left a 74-page manifesto that he posted on social media under the name Brenton Tarrant, identifying himself as a 28-year-old Australian and white nationalist who was out to avenge attacks in Europe perpetrated by Muslims.
Using what may have been a helmet camera, he live-streamed to the world in graphic detail his assault on worshippers at Christchurch's Al Noor Mosque, where at least 41 people were killed. An attack on a second mosque in the city not long after killed several more.
Police did not identify those taken into custody and gave no details except to say that none of them had been on any watch list. They did not immediately say whether the same person was responsible for both shootings.
At least 48 people, some in critical condition, were being treated at Christchurch Hospital for gunshot wounds, authorities said.
While there was no reason to believe there were any more suspects, the prime minister said the national threat level was raised from low to high. Police warned Muslims against going to a mosque anywhere in New Zealand. And Air New Zealand canceled several flights in and out of Christchurch, saying it couldn't properly screen customers and baggage.
Police said the investigation extended 240 miles to the south, where homes in Dunedin were evacuated around a "location of interest." They gave no details.
World leaders condemned the attacks and offered condolences. Pakistan's Prime Minister Imran Khan and other Islamic leaders pointed to the bloodshed and other such attacks as evidence of rising hostility toward Muslims.
"I blame these increasing terror attacks on the current Islamophobia post-9/11 where Islam & 1.3 bn Muslims have collectively been blamed for any act of terror by a Muslim," Khan tweeted.
New Zealand's prime minister alluded to anti-immigrant sentiment as the possible motive, saying that immigrants and refugees "have chosen to make New Zealand their home, and it is their home. They are us."
As for the suspects, Ardern said, "these are people who I would describe as having extremist views that have absolutely no place in New Zealand."
Witness Len Peneha said he saw a man dressed in black enter the Al Noor mosque and then heard dozens of shots, followed by people running out in terror.
Peneha, who lives next door, said the gunman ran out of the mosque, dropped what appeared to be a semi-automatic weapon in his driveway and fled. He said he then went into the mosque to try to help the victims.
"I saw dead people everywhere. There were three in the hallway, at the door leading into the mosque, and people inside the mosque," he said. "I don't understand how anyone could do this to these people, to anyone. It's ridiculous."
He added: "I've lived next door to this mosque for about five years and the people are great, they're very friendly. I just don't understand it."
He said the gunman was wearing a helmet with some kind of device on top, giving him a military-type appearance.
In the video that was apparently lives-streamed, the gunman spends more than two minutes inside the mosque spraying terrified worshippers with bullets again and again, sometimes firing at people he has already cut down.
He then walks outside, where he shoots at people on the sidewalk. Children's screams can be heard in the distance as he returns to his car to get another rifle. The gunman then walks back into the mosque, where there are at least two dozen people lying on the ground.
After going back outside and shooting a woman there, he gets back in his car, where the song "Fire" by the English rock band The Crazy World of Arthur Brown can be heard blasting. The singer bellows, "I am the god of hellfire!" and the gunman drives away.
The second attack took place at the Linwood mosque about 3 miles away.
Mark Nichols told the New Zealand Herald that he heard about five gunshots and that a prayer-goer returned fire with a rifle or shotgun. Nichols said he saw two wounded people being carried out on stretchers past his automotive shop.
Based on the video, the attacker was at the scene of the first mosque for about 10 minutes, and police did not arrive until after that.
The footage showed he was carrying a shotgun and two fully automatic military assault rifles, with an extra magazine taped to one of the weapons so that he could reload quickly. He also had more assault weapons in the trunk of his car, along with what appeared to be improvised explosives.
The gunman said he was not a member of any organization, acted alone and chose New Zealand to show that even the most remote parts of the world were not free of "mass immigration."
In a measure of New Zealand's welcoming attitude toward immigrants, the prime minister announced last year that the country would boost its annual refugee quota from 1,000 to 1,500 starting in 2020. Ardern, whose party campaigned on a promise to take in more refugees, called the increase "the right thing to do."
Christchurch is home to nearly 400,000 people and is sometimes called the Garden City. It has been rebuilding since an earthquake in 2011 killed 185 people and destroyed many downtown buildings.
Before Friday's attack, New Zealand's deadliest shooting in modern history took place in the small town of Aramoana in 1990, when a gunman killed 13 people following a dispute with a neighbor.
Perry reported from Wellington. Kristen Gelineau in Sydney, Rod McGuirk in Canberra, Australia, and Chris Blake in Bangkok contributed to this report.