Forty-nine people have been killed and at least 20 wounded in shootings at two mosques in Christchurch, New Zealand.
Prime Minister Jacinda Ardern described the incident as a terrorist attack and one of New Zealand's "darkest days". It is the nation's deadliest attack.
A gunman identifying himself as an Australian live-streamed the rampage at Al Noor mosque to Facebook.
A man in his late 20s has been arrested and charged with murder. Two other men and one woman were also detained.
Firearms and explosive devices were recovered, Police Commissioner Mike Bush said. One of those detained was later released.
The gunman live-streaming the attack from a head-mounted camera said he was a 28-year-old Australian called Brenton Tarrant. The footage showed 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.
A man who identified himself as Brenton Tarrant (pictured) live-streamed the massacre of dozens of people in Christchurch, New Zealand
The suspect who was charged appeared to have published a document before the attack outlining his intentions and in which he espoused far right and anti-immigrant ideology. He is due in court on Saturday morning.
Australian Prime Minister Scott Morrison described the man as an "extremist, right-wing" terrorist. Police Commissioner Bush confirmed that the man was not known in advance to either New Zealand or Australian security services.
New Zealand police said that officers had gone to a property in the city of Dunedin in connection with the attack in Christchurch.
"It is clear that this can now only be described as a terrorist attack," Prime Minister Ardern said in a press conference.
In a tweet, she said: "What has happened in Christchurch is an extraordinary act of unprecedented violence. It has no place in New Zealand. Many of those affected will be members of our migrant communities - New Zealand is their home - they are us."
How events unfolded
Armed police patrolled the streets following the shooting at the Al Noor mosque
The first report of an attack came from the Al Noor mosque 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.
Mr Bush said a number of firearms had been recovered from both mosques, and explosive devices were found in a car belonging to one of the suspects.
Footage filmed by the gunman at the Al Noor mosque showed him driving up to the front door, before taking weapons from his car, entering the mosque and firing at those inside.
One unnamed survivor told TV New Zealand he saw the 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 witness described hearing rapid gunfire and seeing 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."
Police arrested and charged one man 'in his late 20s' with murder. He is expected to face court Saturday. Pictured is Tarrant during a holiday in Pakistan
Police advised Christchurch residents to remain off the streets and stay indoors and a lockdown was implemented at all schools in the area. The lockdown was later lifted and parents allowed to collect their children.
The main suspect
Brenton Tarrant identified himself in the video live-streamed on Facebook.
Social media accounts in that name were used to post a lengthy, racist document in which the author identified the mosques that were later attacked and set out anti-immigrant motivations for the attack.
Although New Zealand police said they had charged a man in his late twenties with murder, they did not identify the man.
Cricket team escapes attack
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.
What has the reaction been?
US President Donald Trump offered his "warmest sympathy and best wishes" to New Zealand. "The US stands by New Zealand for anything we can do. God bless all!" he wrote.
UK Prime Minister Theresa May offered her "deepest condolences to the people of New Zealand".
The Queen said she was "deeply saddened by the appalling events in Christchurch today. Prince Philip and I send our condolences".
Pope Francis offered his "heartfelt solidarity" and was "deeply saddened to learn of the injury and loss of life caused by the senseless acts of violence", Vatican Secretary of State Pietro Parolin said in a telegram.
German Chancellor Angela Merkel said she mourned "with New Zealanders for their fellow citizens who were attacked and murdered out of racist hatred while peacefully praying in their mosques".
And French President Emmanuel Macron called it an "odious attack" and said France stood "against any form of extremism".