Forty-nine people have been killed and 20 wounded in what the prime minister of New Zealand called a "terror attack" on two mosques in the capital of Christchurch.
Jacinda Arden said New Zealand had been placed on its highest security-threat level. She said four people in police custody, three men and one woman, held extremist views but had not been on any police watchlists.
"It is clear that this can only be described as a terrorist attack," Ardern said.
Police Commissioner Mike Bush said 49 people had been killed at two mosques and one man in his late 20s charged with murder.
Afghanistan's ambassador to Australia, New Zealand, and Fiji said on Twitter that one Afghan national had been killed and three others wounded in the attack.
One man who said he was at the Masjid al-Noor mosque told media the gunman was white, blond, and wearing a helmet and a bulletproof vest. The man burst into the mosque as worshippers were kneeling for prayers.
"He had a big gun...he came and started shooting everyone in the mosque, everywhere," said the man, Ahmad al-Mahmoud. He said he and others escaped by breaking through a glass door.
Radio New Zealand quoted a witness inside the mosque as saying he heard shots fired and at least four people were lying on the ground and "there was blood everywhere".
Australian Prime Minister Scott Morrison confirmed that one of the detained suspects was an Australian.
A man who claimed responsibility for the shootings said in a manifesto that he was a 28-year-old white Australian who came to New Zealand only to plan and prepare for the attack.
Police said improvised explosive devices were found with a vehicle they stopped.
All mosques in New Zealand had been asked to shut their doors, police said.
The Bangladeshi cricket team was arriving for Friday Prayers when the shooting occurred but all members were safe, a team coach told Reuters.
In earlier comments, Ardern said the events made for "one of New Zealand's darkest days."
"What has happened here is an extraordinary and unprecedented act of violence," she added.
Turkish President Recep Tayyip Erdogan called on Western countries to rapidly take measures to curb rising racism against Islam and Muslims, saying new attacks like the one in New Zealand would otherwise be "inevitable."
Pakistani Prime Minister Imran Khan blamed what he called rising Islamophobia for the violence in New Zealand.
Writing on Twitter, Khan said that "terrorism does not have a religion."
Shootings of this type are rare in New Zealand. The country tightened its gun laws to restrict access to semiautomatic rifles in 1992 after a mentally disturbed man shot 13 people dead in the town of Aramoana.
Still, a person over 16 can apply for a standard firearms license after completing a safety course.