The massacre was teased on Twitter, announced on the message board 8chan and streamed on Facebook, a live feed that showed a gunman mercilessly shooting down dozens worshipers during an hour of prayer at New Zealand mosque.

In a six-minute stretch, the man, wearing tactical gear and a camera attached to his outfit, shot hundreds of rounds into dozens of people — many huddled defenselessly in the corners of one of the mosque’s main rooms, others attempting to flee as the shots popped off rapidly.

His weapon was scrawled with neo-Nazi symbols and the names of white right-wing extremists who had killed others because of their ethnicity or faith. A manifesto released online laid his motivations out to bare: to kill Muslim immigrants. Seven other people were killed at another mosque nearby, bringing the toll of the two attacks to 49 people, an brutal act of terrorism that Prime Minister Jacinda Ardern called “one of New Zealand’s darkest days.”

Terrorists have long relied on media coverage to help spread the potent cocktail of fear and division incited by their violence. And social media outlets have become a venue for a small number of people to broadcast murders. But the attack on Friday afternoon seemed to turn a new page. It showed the full horror of the worst elements of internet culture brought into real life: a man who had spiked a white nationalist ideology with in-jokes and memes in the service of a brutal mass murder committed for an audience online.

New Zealand police said they arrested three people in connection with the shootings. Authorities consider Brenton Harrison Tarrant, an Australian national, the primary suspect. During a hearing on Saturday in which Judge Paul Keller denied open, public access in the interest of safety — an unusual move for New Zealand courts — Tarrant was charged with murder and remanded in custody to appear again on April 5. He did not enter a plea. One charge was filed against Tarrant on Saturday, but further charges are likely.

A second man allegedly involved with the attack, 18-year-old Daniel John Burrough, was scheduled to appear in court Saturday. He was charged with inciting racial hostility or ill-will.

A third accomplice remained unidentified as of Friday evening, Eastern Time.

Ardern said officials had noted the Australian’s international travel history, but she did not give more information about that. None of the individuals had criminal records in Australia or New Zealand, or were on security watch lists, Ardern said.

Police deactivated an improvised explosive device and were working to disarm a second that had been attached to a vehicle used by the suspects on Friday. Two homes were evacuated around a “location of interest” in Dunedin. Counterterrorism forces were activated across New Zealand and Australia, as New Zealand elevated its national security threat level to “high” for the first time.

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. Another person died at the hospital.

Witnesses at the mosque in Linwood said further bloodshed was averted when a caretaker jumped on the gunman and wrestled away his weapon, forcing him to flee, local media reported.

Officials said more than 40 patients, including both young children and adults, were treated for gunshot wounds at Christchurch Hospital. A five-year-old had been transported to a hospital in Auckland for treatment, Ardern said.

Video of the shooting begins with the gunman driving to the mosque clad in tactical gear, his car full of weapons. It shows the shooting from his perspective — a chilling record of mass violence that police have warned people not to share. The shooter fires hundreds of rounds of bullets at defenseless worshipers inside and outside Al Noor Mosque, where the majority of the bloodshed occurred, retreating at one point to his car for another weapon. He doubles back on injured victims to make sure they are dead. The violence lasts about six minutes.

Nour Tavis, who was at the mosque and escaped after someone smashed a window in the building’s exterior, said the shooter turned his gun on everyone he could find inside.

Ardern said that the suspect had used five guns in total, two semi-automatic rifles and two shotguns, as well as a lever-action firearm. He had a license for the guns that he acquired in November 2017; he began purchasing the weapons that December, she said.

She vowed to spearhead an effort to change the country’s gun laws, which are more stringent than they are in the United States, but not as strict as regulations in Australia and much of Europe.

“I can tell you right now our gun laws will change," she said. “Now is the time.”

The 74-page manifesto left behind after the attack was littered with conspiracy theories about white birthrates and “white genocide.” It was the latest sign that a lethal vision of white nationalism has spread internationally. Its title, “The Great Replacement,” echoed the title of a book by a far-right French polemicist, as well as the rallying cry of, among others, the torch-bearing protesters who marched in Charlottesville in 2017.

And it was laced with pop cultural references familiar to people who spend a significant amount of time online. Some of them, like the assertion that a video game had trained him to kill, seemed made ironically — perhaps another tactic to spark the fear and divisiveness the writer said he sought.

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.

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,” the police commissioner 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.

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 past 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 said.

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

She said New Zealand was chosen for the attack “because we represent diversity, kindness, compassion, a home for those who share our values.” Addressing those responsible for the attack directly, she said: “You may have chosen us. But we utterly reject and condemn you.”

Before the attack, someone with apparent advance knowledge of unfolding events posted links to the 74-page manifesto on Twitter and the message board 8chan, 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.”

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, 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.”

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

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 rampage after an argument with a neighbor.

Violent crime is rare in New Zealand compared with 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.

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 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 who went to Al Noor Mosque in downtown Christchurch were members of Bangladesh’s national cricket team, according to a Bangladeshi journalist, Mohammad Isam. They apparently were arriving on a bus just as the attack began and were able to escape unharmed. 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.”

Our Muslim community, and all Cantabrians, the country stands with you. There is no place for hate in New Zealand.

Law enforcement officials in several U.S. 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.”

"There can be no place in our societies for the vile ideology that drives and incites hatred and fear. Our thoughts and prayers are with the people of New Zealand." – PM @Theresa_Maypic.twitter.com/ZbsNpOGnrq

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.

Eli RosenbergEli Rosenberg is a reporter on The Washington Post's General Assignment team. He has worked at the New York Times and the New York Daily News. Follow

Alex HortonAlex Horton is a general assignment reporter for The Washington Post. He previously covered the military and national security for Stars and Stripes, and served in Iraq as an Army infantryman. Follow

Michael Brice-SaddlerMichael Brice-Saddler is a general assignment reporter. He joined The Washington Post in June 2018 as an intern after graduating from the University of Maryland at College Park. Follow

Sign up for email updates from the "Confronting the Caliphate" series.

Content from Allstate This content is paid for by an advertiser and published by WP BrandStudio. The Washington Post newsroom was not involved in the creation of this content. Learn more about WP BrandStudio.