This story has been updated.

New Zealand’s Prime Minister Jacinda Ardern called Friday “one of New Zealand’s darkest days.” A heavily armed gunman clad in military-style gear opened fire during prayers at a mosque in the center of Christchurch, New Zealand, on Friday. As a result, 50 people are dead and scores more are injured.

New Zealand Police Commissioner Mike Bush said 41 people were killed at Al Noor Mosque on Deans Road, opposite a large downtown park. Seven more were fatally shot about three miles away at a mosque in Linwood, an inner suburb of Christchurch, and another person died at the hospital.

Health officials said 48 patients, including both young children and adults, were being treated for gunshot wounds at Christchurch Hospital, while additional victims were seeking medical treatment elsewhere. Around 200 family members were at the hospital awaiting news about loved ones.

Authorities said initially they had four people in custody but later revised that number to three. One man in his late 20s, whom the authorities declined to name, was charged with murder and was expected to appear in court on Saturday morning. It was not clear how the other two people were connected. None of them had not been on security watch lists, officials said.

The mayor of Christchurch, Lianne Dalziel, addressed residents in a Facebook video on Friday, asking them to remain calm. “It looks as though the worst has happened,” she said.

The attack was broadcast

Portions of the ghastly attack were broadcast live on social media by a man who police confirmed had also released a manifesto railing against Muslims and immigrants. The 74-page document states that he was following the example of notorious right-wing extremists, including Dylann Roof, who murdered nine black churchgoers in Charleston, S.C., in 2015.

The manifesto was littered with conspiracy theories about white birthrates and “white genocide,” is the latest sign that a lethal vision of white nationalism has spread internationally. Its title, “The Great Replacement,” echoes the rallying cry of, among others, the torch-bearing protesters who marched in Charlottesville in 2017.

The digital platforms apparently enlisted in the shooting highlight a distinctly 21st-century dimension of mass gun violence — one sure to put more pressure on social media companies already under scrutiny about how they police their services. Government officials in New Zealand warned its citizens that sharing video of the attack was likely against the law.

Continuing security risks

Schools and public buildings, as well as the Christchurch Hospital, were on lockdown for hours on Friday afternoon as the police commissioner advised residents of Christchurch, the largest city on the South Island, to stay off the streets. The city, known for its relative stoicism in the aftermath of a series of large earthquakes, was quietly tense as residents came to terms with the gravity of the day’s incidents.

Bush appealed to Muslims nationwide, asking them to stay away from mosques while the security risk remained grave.

“I want to ask anyone that was thinking of going to a mosque anywhere in New Zealand today not to go, to close your doors until you hear from us again,” he said at a news conference.

In a country of nearly 5 million, more than 46,000 residents are Muslim, according to data from the 2013 census, up 28 percent from 2006.

Targeting the migrant population

Members of a refugee family who had fled Syria’s civil war appeared to be among the victims, Ali Akil, an Auckland-based spokesman for Syrian Solidarity New Zealand, said in an interview. The family’s father was killed, a son was seriously wounded, and another son was reported missing, Akil said, citing information he had received from a friend of the family.

Akil said the family had likely come to New Zealand in the last four or five years, to “a safe haven, only to be killed here."

The prime minister said New Zealand has suffered “an extraordinary and unprecedented act of violence,” lamenting in particular that a target was placed on the country’s migrant population. “They have chosen to make New Zealand their home, and it is their home,” she said.

“They are us,” Ardern intoned.

The “extremist views” that she said motivated the attackers “have absolutely no place in New Zealand,” Ardern said, “and, in fact, have no place in the world.”

She said the attackers chose New Zealand “because we represent diversity, kindness, compassion, a home for those who share our values.”

Addressing them directly, she said: “You may have chosen us. But we utterly reject and condemn you.”

Messages in the manifesto and on social media

Before the attack, someone with apparently advance knowledge of unfolding events posted links on Twitter and the message board 8chan to the 74-page manifesto, as well as to a Facebook page where the individual promised that the attack would be streamed live. The Twitter posts included images of weapons and ammunition, as well as the names of perpetrators of past mass-casualty shootings.

In the manifesto, the purported shooter identified himself as a 28-year-old white man born in Australia. He described his motivation, which he said involved defending “our lands” from “invaders” and ensuring “a future for white children.”

He aimed to “directly reduce immigration rates,” he said, explaining that he had chosen to target New Zealand to illustrate that there was nowhere “left to go that was safe and free from mass immigration.”

The 17-minute video, which seemed to have been filmed from a helmet camera, captured the man’s drive to the mosque. Once there, he pulled a weapon from the trunk of the car and walked a short distance to the entrance, where he began to shoot. From the inside of the building, he can be seen spraying bullets through the corridors and into the rooms of the house of worship.

How social media sites are responding

Twitter said it has suspended the account where the links first appeared and was “proactively working to remove the video content from the service,” according to a spokesman. Facebook “quickly removed both the shooter’s Facebook and Instagram accounts and the video” as soon as the social media company was alerted by police, a spokeswoman, Mia Garlick, said in a statement. “We’re also removing any praise or support for the crime and the shooter or shooters as soon as we’re aware.”

The aggregation and discussion website Reddit was also “actively monitoring the situation” and removing “content containing links to the video stream,” a spokesman told The Post.

Further afield, Felix Kjellberg, a YouTube celebrity from Sweden who goes by “PewDiePie” and flirts openly with Nazi symbolism, distanced himself from the violence after the man who live-streamed his rampage asked viewers to “subscribe to PewDiePie.”

Gun laws and violent crime in New Zealand

The author of the manifesto also said he intended to deepen strife in the United States over gun ownership and the Second Amendment.

Gun laws in New Zealand are more stringent than they are in the United States, but not as strict as regulations in Australia and much of Europe. In 2017, more than 1.5 million guns were held by civilians in New Zealand, according to a tracking website maintained by the University of Sydney School of Public Health.

New restrictions came into effect, including on military-style semiautomatic weapons, after what was previously the deadliest shooting in New Zealand’s modern history. In 1990, 13 people were killed in the seaside town of Aramoana when a resident, David Gray, went on a shooting spree after an argument with a neighbor.

Violent crime is rare in New Zealand, compared to the rest of the world. Murders in the country fell to a 40-year low of 35 in 2017, police said, a rate of seven deaths for every 1 million people.

The sense of tranquility reflected in those figures was replaced by mayhem and desperation, as residents appeared on local television pleading for information about family members who were at the targeted mosques during Friday prayers.

‘There was blood everywhere’

Recalling the scene inside the downtown mosque, where several hundred worshipers had been present for afternoon prayers, an eyewitness told Radio New Zealand, “There was blood everywhere.” Others described to local television how they heard fellow worshipers crying out for help and saw bullet shells strewn across the floor.

Video on social media of the attack’s aftermath showed a state of disbelief, as mosque-goers huddled around the injured and dead. Amid anguished cries, a person could be heard saying, “There is no God but God,” the beginning of the Muslim profession of faith.

Ikhlaq Kashkari, president of the New Zealand Muslim Association, thanked police and urged “all New Zealanders to stay calm and united,” according to local media.

Jill Keats, 66, told Newshub she was on her way to lunch when she heard noises that she thought at first were firecrackers. Then, she saw victims come streaming out of the mosque, some of whom she helped find medical aid.

“I never thought in my life I would see something like this,” she said. “Not in New Zealand.”

Among those inside the mosque in downtown Christchurch were members of Bangladesh’s national cricket team, according to a Bangladeshi journalist, Mohammad Isam. The ESPNcricinfo correspondent posted a video on Twitter of the cricket players hurrying through nearby Hagley Park as sirens wailed in the background.

Government ministers voiced shock and outrage. Deputy Prime Minister Winston Peters, speaking on Checkpoint, said the country had been robbed of its “innocence,” while Andrew Little, the justice minister, affirmed, “There is no place for hate in New Zealand.”

Officials in Australia, including Prime Minister Scott Morrison, expressed solidarity. Morrison, speaking to reporters Friday evening, confirmed that one of the individuals taken into custody was an Australian-born citizen. Morrison called the suspect “an extremist, right-wing, violent terrorist.”

Marise Payne, Australia’s minister for foreign affairs, said, “Targeting people in a place of worship is abhorrent and an affront to all.”

Response from America and Europe

Law enforcement officials in several American cities increased patrols at and around mosques in the wake of the attack. The Council on American-Islamic Relations, the nation’s largest Muslim civil rights and advocacy organization, decried the “apparent anti-Muslim and anti-immigrant hate that motivated the attacks.”

Leaders in Europe said they would do the same, as they condemned the attack and expressed support for New Zealand. European Council President Donald Tusk predicted that the attack would not “diminish the tolerance and decency that New Zealand is famous for.” He added, “Our thoughts in Europe are with the victims and their families.”

President Trump issued a statement on Friday morning extending his “warmest sympathy and best wishes” to the people of New Zealand.

“49 innocent people have so senselessly died, with so many more seriously injured," he wrote on Twitter. "The U.S. stands by New Zealand for anything we can do. God bless all!”

Officials in Muslim-majority countries deplored the violence visited on the mosques.

Turkish President Recep Tayyip Erdogan addressed a message “to the Islamic world and the people of New Zealand, who have been targeted by this deplorable act,” which he described as “the latest example of rising racism and Islamophobia.” Anwar Gargash, minister of state for foreign affairs in the United Arab Emirates, wrote on Twitter that “our collective work against violence & hate must continue with renewed vigor.” A statement from Saudi Arabia said the kingdom condemned “terrorism in all its forms and manifestations.”

Emanuel Stoakes, in Christchurch, New Zealand, Kareem Fahim in Istanbul, Mark Berman and Antonia Noori Farzan in Washington, and Amar Nadhir in Bucharest, Romania, contributed to this report.

‘More killing and sexual violence’: The Turkish assault in Syria could eradicate women’s hard-won rights

Since Wednesday, Turkish forces have been bombarding northeastern Syria

ISIS women impose a brutal rule at al-Hol, a sprawling tent camp in Syria

About 20,000 women and 50,000 children who had lived under the caliphate are held in dire conditions at the camp

‘We have families’: In a video, a kidnapped aid worker in Nigeria pleads for her life

Kidnapping in Nigeria has become epidemic in recent years