At least 40 people have been killed after shootings at two mosques in the New Zealand city of Christchurch.
Three men and one woman are in custody, but police have warned there could be other attackers at large.
One of the arrested suspects is Australian, Australian prime minister Scott Morrison confirmed.
Footage on social media appeared to show a gunman live-streaming as he entered a mosque with his weapon drawn.
Prime Minister Jacinda Ardern said 40 people were killed and more than 20 were seriously injured.
She said the country had been placed on its highest security threat level and that the four suspects held extremist views, but had not been on any police watchlists.
At a news conference, Police Commissioner Mike Bush said a number of schools had been placed on lockdown, as well as the two mosques that were targeted.
The public are being urged to stay indoors, and worshippers are being told to stay away from mosques until further notice.
Mr Bush also confirmed that a number of improvised explosive devices attached to vehicles in Christchurch have been made safe.
One man who was inside the Al Noor mosque - the scene of the deadliest shooting - told local media that there would normally be dozens of people worshipping inside.
The witness, whose clothes had been splattered with blood, claimed the shooting lasted for about 20 minutes and said the gunman methodically went from room to room.
He said he was one of the last people to leave the mosque - and had prayed that the gunman would run out of bullets.
"It took me half an hour before my shaking stopped," the survivor added. "I don't know whether my brother is safe or not."
Len Peneha said he saw a man dressed in black enter the Al Noor mosque - with people running away in terror. He also claimed that he saw the gunman flee before emergency services arrived.
Ms Ardern described the shooting as an "extraordinary unprecedented act of violence".
She said: "It is clear this is one of New Zealand's darkest days.
"Many of those affected might be migrants to New Zealand. They have chosen to make New Zealand their home and it is their home.
"There is no place in New Zealand for such acts of extreme and unprecedented violence which it is clear this act was."
Australia's prime minister said the country is "shocked" and "appalled" by the incident.
He told reporters on Friday: "As family members with our New Zealand cousins today, we grieve, we are shocked, we are appalled, we are outraged, and we stand here and condemn absolutely the attack that occurred today by an extremist, right-wing, violent terrorist."
Players and members of the Bangladesh cricket team's coaching staff were reportedly on their bus and approaching the mosque for Friday prayers when the shooting broke out.
Opening batsman Tamim Iqbal tweeted: "Entire team got saved from active shooters. Frightening experience and please keep us in your prayers."
Player Mushfiqur Rahim also posted: "Alhamdulillah Allah save us today while shooting in Christchurch in the mosque. We (were) extremely lucky...never want to see this things happen again....pray for us."
The team was in Christchurch to play New Zealand in a third cricket test starting on Saturday - but the match has now been cancelled.
Mass shootings are a rare occurrence in New Zealand, with the last being in 1990 in the small seaside town of Aramoana.
Thirteen people died in that attack, as well as gunman David Gray.