Forty-nine people have been killed and at least 20 wounded in shootings at two mosques in Christchurch, New Zealand, writes BBC.
Australian Prime Minister Scott Morrison described an alleged gunman, who had Australian citizenship, as an "extremist, right-wing" terrorist.
A man in his late twenties was charged with murder and will appear in court on Saturday morning, police confirmed.
Two other men and one woman were detained nearby and firearms seized, Police Commissioner Mike Bush said.
He said police had determined that one of the people detained was not involved in the incident, and officers were working to understand if the other two were connected.
The gunman appeared to have live-streamed footage of his rampage to Facebook, filmed with a head-mounted camera. The footage appeared to show him firing indiscriminately at men, women, and children from close range inside the Al-Noor mosque.
Police called on the public not to share the "extremely distressing" footage online. Facebook said it had removed the gunman's Facebook and Instagram accounts and was working to remove any copies of the footage.
The suspect was also believed to have published a manifesto outlining his intentions, in which he identified himself as a 28-year-old born in Australia and espoused far right and anti-immigrant ideology.
Police Commissioner Bush confirmed that the suspect who was charged was not known in advance to either New Zealand or Australian security services.
New Zealand Prime Minister Jacinda Ardern called it one of New Zealand's "darkest days". "It is clear that this can now only be described as a terrorist attack," she said.
The first report of an attack came from the Al Noor mosque, located in central Christchurch. Witnesses told local media they ran for their lives, and saw people bleeding on the ground outside the building.
A second mosque in the suburb of Linwood was evacuated, but there were fewer details from that site. Police also defused "a number of IEDs (explosive devices) attached to vehicles", Mr Bush said.
Authorities advised all mosques in the city to shut down until further notice. Armed police were also seen at Papanui High School in Christchurch, which was cordoned off.
Speaking at a press conference, Mr Bush said police were working to determine whether the other suspects detained were involved in the incident.
He said a number of firearms had been recovered from both shooting sites.
The sequence of events remains unclear and has mostly come via eyewitness reports to local media.
One unnamed survivor told TV New Zealand he was at the Al Noor mosque, and saw a gunman shoot a man directly in the chest. The attacker reportedly targeted the men's prayer room in the mosque, then moved to the women's room.
"What I did was basically just waiting and praying, God please, let this guy run out of bullets," the witness said. "He came to this side, he shot this side, he went to another room and went to the ladies' section and shot them. I just heard one of the ladies has died."
A Palestinian man who asked not to be named told the AFP news agency he heard rapid gunfire and saw a man shot in the head.
"I heard three quick shots, then after about 10 seconds it started again - it must have been an automatic, no one could pull a trigger that quick," he said. "Then people started running out. Some were covered in blood."
A second mosque in the suburb of Linwood was also evacuated. The police commissioner said "multiple fatalities" were recorded at two locations.
Multiple casualties were brought to Christchurch Hospital where there was a heavy police presence. A spokeswoman said Canterbury District Health Board (CDHB) had activated its mass casualty plan, the New Zealand news site Stuff.co.nz reported.
Police earlier cleared Cathedral Square, where thousands of children had been holding a rally for action on climate change.
Police Commissioner Bush said: "Police are responding with its full capability to manage the situation, but the risk environment remains extremely high. Police recommend that residents across Christchurch remain off the streets and indoors until further notice."
A lockdown on all schools in Christchurch was lifted, and parents told could collect their children.
Australia's Prime Minister Scott Morrison tweeted: "I'm horrified by the reports I'm following of the serious shooting in Christchurch, New Zealand. The situation is still unfolding but our thoughts and prayers are with our Kiwi cousins."
The Bangladesh national cricket team appeared to have narrowly escaped the shooting. A reporter following the team, which was due to play New Zealand in a now-cancelled test match on Saturday, tweeted that the team had "escaped from a mosque near Hagley Park where there were active shooters".
Player Tamim Iqbal tweeted that the "entire team got saved from active shooters".
Bangladesh Cricket Board spokesman Jalal Yunus said most of the team had gone to mosque by bus and were about to go inside when the incident took place.
"They are safe. But they are mentally shocked. We have asked the team to stay confined in the hotel," he told the AFP news agency.