The wounded tried to crawl away or lie still, while others ran or crouched behind the dead, but the gunman kept pulling the trigger.
He shot fleeing women and girls, and pumped bullet after bullet into piles of motionless men and boys in a house of worship.
The man accused of carrying out the worst mass murder in New Zealand’s modern history, one that left 49 people dead and more than 40 others wounded at two mosques in Christchurch, was identified in court documents on Saturday as Brenton Harrison Tarrant, 28. The suspect, who officials said is an Australian citizen, was charged with one count of murder, and more were expected to come.
It remained unclear whether there was just one gunman. Three other people were detained by the police, but one was released hours later.
The horror was designed specifically for an era that has married social media and racism — a massacre apparently motivated by white extremist hatred, streamed live on Facebook and calculated to go viral.
The shooting represented a staggering corruption of a form of communication, used innocently by millions, that promised to draw people together but has also helped pry them apart into warring camps. It also shattered a veneer of civility and security in one of the safest and most highly developed countries in the world.
A man at the door to the Al Noor mosque on Deans Avenue called out “hello, brother,” just before the approaching killer opened fire with a semiautomatic rifle. Seconds later, a wounded man, trying to crawl away, was shot again at point-blank range.
Within moments, terror and chaos gripped the people gathered at the mosque for Friday Prayer, as they ran, screamed and tried to climb the walls around the building. Parents tried to shield their children, others ducked behind or under parked cars, and at least one nearby resident opened her home to shelter people fleeing the mayhem.
The Facebook video, shot from the killer’s helmet-mounted camera, and a 74-page statement that the authorities said was written by the gunman, point to an array of possible role models, from racist mass murderers to Oswald Mosley, the 20th century British fascist.
Standard white supremacist and far-right nationalist tropes, like fears of a “white genocide,” are sprinkled throughout the statement. There are also elements of a self-flattering reach for larger meaning: references to centuries-ago battles between Christians and Muslims are scrawled on his guns, and on the video he refers to his slaughter of unarmed people as “the firefight.”
But the potential clues in the statement appeared to be as much an exercise in misdirection, provocation and “trolling” as a statement of any ideology, making it hard to separate belief from inside jokes among extremists, deliberate baiting and pointless hate.
New safeguards developed by tech companies over the last 18 months were not enough to stop the video and statement from being widely posted, on Facebook, YouTube, Twitter and Instagram. While Facebook and Twitter took down pages thought to be linked to the gunman, the posted content was spread rapidly through other accounts. Some people appeared to be using techniques to evade automated systems that find and delete content.
President Trump on Friday described the attack as “a horrible disgraceful thing, horrible act.” But when asked if he saw white nationalism as a rising threat around the world, he said: “I don’t really. I think it’s a small group of people that have very, very serious problems, I guess.”
Many Western leaders denounced the attack as an act of terrorism, and made a point of stating their support for Muslims.
“Through terror attacks that have taken place on U.K. soil we know only too well the pain that such horrifying attacks can cause,” Prime Minister Theresa May of Britain said. “As New Zealand has stood by us so we stand shoulder to shoulder with them, and with Muslims in New Zealand, here in the U.K. and around the world.”
Driving his white S.U.V. to the Deans Avenue mosque on Friday afternoon, the gunman played aloud a propaganda song that pays tribute to Radovan Karadzic, the former Bosnian Serb leader who was convicted of genocide and war crimes.
Forty-one of the people who died were killed at that mosque. Seven others were killed at the Linwood mosque, about three miles away, and one died at Christchurch Hospital, which lies between the two.
New Zealand’s prime minister, Jacinda Ardern, said on Saturday that a total of five firearms, including two semiautomatic weapons, were used in the attacks. New Zealand has fairly lax guns laws, but little gun violence.
“Our gun laws will change, now is the time,” Ms. Ardern said, though she did not say what that legislation would look like. “People will be seeking change, and I am committed to that.”
Two homemade explosives were found in the suspect’s car, the police have said. The attack put the city of almost 400,000 people on lockdown for hours, as the police searched for more suspects, accomplices or bombs.
Syed Mazharuddin told the New Zealand Herald that he was in the mosque on Linwood Avenue, and that “there were elderly people sitting there praying and he just started shooting at them.”
Speaking to reporters on Friday, a shaken Mohammad Nazir haltingly tried to describe what he had seen inside the Deans Avenue mosque, where he said there were “lots of people” lying on the blood-soaked green carpet.
“I just heard ‘Help! Help!’ ” he said.
He ran behind the building and climbed over a wall into a neighboring yard.
Mulki Abdiwahab, an 18-year-old university student, was with her mother in the women’s prayer room at the Deans Avenue mosque when the gunfire began.
“I’ve never heard a gunshot before,” she told Radio New Zealand. “I thought at first it was somebody was banging on the window.”
“My mom grabbed my hand and then we just ran outside and everyone was in chaos, just running for their lives,” she said.
They left behind their shoes, purses and a laptop, and did not stop running until a woman who lives down the street waved them into her house, she said.
Later, they learned that her father, who like many victims was in the men’s prayer room, had been wounded.
The gunman’s video shows him reloading repeatedly, snapping new ammunition magazines into his assault rifle. Then he returned to his vehicle, got another gun, went back into the building and resumed shooting.
When he left for good, he fired down the sidewalk in both directions, and down the alleyway where he had parked. He walked up to a wounded woman dressed in black who lay on the pavement crying “help me, help me,” and shot her twice more.
He left about six minutes after he had arrived. As he began to drive away, he fired into parked cars with a pump-action shotgun before speeding off.
Officials did not make clear whether the Linwood Avenue attack took place before or after the Deans Avenue massacre, or if the same person committed both. The first calls to the police came at about 1:40 p.m.
Yama al Nabi was running late to meet his father at the Deans Avenue mosque, when he came on the nightmarish scene of wailing and bleeding people, illuminated by the flashing lights of police cars.
He asked survivors about his father, Dawoud Nabi, 65, a native of Afghanistan who had lived in New Zealand since 1977.
“Someone said he jumped the fence and said he’s safe,” he told The New York Times. “Then I waited and waited and my daughter called and said he’s dead.”
On Saturday morning, his hands shaking, he showed reporters a photo on his phone of his father and his daughter.
“Dad was the leader of the Afghan community and welcomed everyone,” he said.
He had gone to the courthouse where the accused gunman would appear. “Just want to see his face,” he said.
Members of Bangladesh’s national cricket team, who were in Christchurch for a match, were also saved by tardiness, after a news conference delayed their walk to the Deans Avenue mosque.
Mohammad Isam, an ESPN reporter covering the team, reported on an ESPN website that at 1:52 he got a terrified call from Tamim Iqbal Khan, one of the Bangladesh cricketers.
“There’s shooting here, please save us,” Mr. Khan said, according to Mr. Isam.
“I first think that he is playing a prank but he hangs up and calls again — this time, his voice starts to crack,” Mr. Isam wrote. “He says that I should call the police as there’s a shooting going on inside the mosque where they are about to enter.”
Mr. Khan wrote on Twitter: “Entire team got saved from active shooters.”
Another player, Mushfiqur Rahim, tweeted “we r extremely lucky … never want to see this things happen again … pray for us.”