Updated

Multiple people were killed in mass shootings at two mosques full of people attending Friday prayers, as New Zealand police warned people to stay indoors as they tried to determine if more than one gunman was involved.

Prime Minister Jacinda Ardern described it as "one of New Zealand's darkest days" and said the events in the city of Christchurch represented "an extraordinary and unprecedented act of violence."

One person was taken into custody but it was unclear if there were other people involved, Police Commissioner Mike Bush said. He said anybody who was thinking of going to a mosque anywhere in New Zealand on Friday should stay put.

Authorities have not said who they have in custody. But a man who claimed responsibility for the shootings left a 74-page anti-immigrant manifesto in which he explained who he was and his reasoning for his actions. He said he considered it a terrorist attack.

Ardern at her news conference alluded to anti-immigrant sentiment as the possible motive, saying that while many people affected by the shootings may be migrants or refugees "they have chosen to make New Zealand their home, and it is their home. They are us. The person who has perpetuated this violence against us is not."

Authorities have not yet said how many people were killed and wounded. "It's a very serious and grave situation," Bush said.

The deadliest shooting occurred at the Masjid Al Noor mosque in central Christchurch at about 1:45 p.m.

Witness Len Peneha said he saw a man dressed in black enter the mosque and then heard dozens of shots, followed by people running from the mosque in terror.

Peneha, who lives next door to the mosque, said the gunman ran out of the mosque, dropped what appeared to be a semi-automatic weapon in his driveway, and fled.

Peneha said he then went into the mosque to try and help.

"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. "It's unbelievable nutty. I don't understand how anyone could do this to these people, to anyone. It's ridiculous."

He said he helped about five people recover in his home. He said one was slightly injured.

"I've lived next door to this mosque for about five years and the people are great, they're very friendly," he said. "I just don't understand it."

He said the gunman was white and was wearing a helmet with some kind of device on top, giving him a military-type appearance.

Police said there was a second shooting at the Linwood Masjid Mosque.

Mark Nichols told the New Zealand Herald he heard about five gunshots and that a Friday prayer-goer returned fire with a rifle or shotgun.

Nichols said he saw two injured people being carried out on stretchers past his automotive shop and that both people appeared to be alive.

The man who claimed responsibility for the shooting said he was 28-year-old white Australian who came to New Zealand only to plan and train for the attack. He said he was not a member of any organization, but had donated to and interacted with many nationalist groups, though he acted alone and no group ordered the attack.

He said the mosques in Christchurch and Linwood would be the targets, as would a third mosque in the town of Ashburton if he could make it there.

He said he chose New Zealand because of its location, to show that even the most remote parts of the world were not free of "mass immigration."

Mass shootings in New Zealand are exceedingly rare. The deadliest in modern history occurred in the small town of Aramoana in 1990, when gunman David Gray shot and killed 13 people following a dispute with a neighbor.

___

Perry reported from Wellington.