CHRISTCHURCH, New Zealand — Abdul Aziz was praying with his four sons in the Linwood Mosque when he heard the gunshots. Rather than run from the noise, he ran toward it, grabbed the first thing he could find — a credit card machine — and flung it at the attacker.
The man dropped a shotgun, and Mr. Aziz picked it up. “I pulled the trigger, and there was nothing,” he recalled. The gunman ran to his car, where he had other weapons, and Mr. Aziz followed, throwing the shotgun at the vehicle and shattering a window.
Mr. Aziz’s actions, which he and others described in interviews, may have prompted the gunman to speed away rather than return to kill more people. Minutes later, two police officers rammed the suspect’s car into a curb and took him into custody, ending the worst mass murder in New Zealand’s modern history.
The authorities have not released a detailed account of the police response to Friday’s massacre at two mosques in the city of Christchurch, emphasizing that officers apprehended the suspect only 36 minutes after receiving the first emergency call.
But interviews with dozens of survivors, and an analysis of a video recorded by the attacker as well as one made of his arrest by a bystander, suggest that the violence ended after a near miss by the police at the first mosque — and acts of courage during and after the attack on the second.
If not for the two police officers, who have not been publicly identified, and Mr. Aziz, 48, a ponytailed furniture shop owner who fled Afghanistan a quarter-century ago, the slaughter might have continued. The suspect had two other guns in his car, the police said, as well as two homemade explosives.
“It absolutely was his intention to continue with his attack,” said Prime Minister Jacinda Ardern after the arrest of Brenton Tarrant, 28, a former personal trainer from Australia who allegedly distributed a manifesto of white extremist hatred minutes before the rampage.
The police said 42 people were killed at central Christchurch’s Al Noor Mosque and seven at the Linwood Mosque, and some attributed the lower toll at Linwood to Mr. Aziz’s decision to confront the gunman. (An additional victim died at a hospital.)
It is unclear exactly what time the gunman entered Al Noor, which was crowded with worshipers for Friday Prayer. But the police said that they received the first call for help at 1:41 p.m., and that the first officers arrived there six minutes later.
The video recorded by the gunman, which was livestreamed on Facebook, showed a man trying to tackle him inside the mosque only to be shot and killed.
Six minutes after firing his first shot, he drove away. Three minutes later, a siren can be heard on the video as he is driving to the second mosque.
The siren becomes louder then fades, suggesting the police and the gunman may have just missed each other, with officers and medical personnel racing toward Al Noor as he was pulling away.
The nearest police station is less than two kilometers from the mosque, or little more than a mile, but the responding officers may have been farther away.
There are 827 full-time constables in the Canterbury district, the pastoral region on the east coast of New Zealand’s South Island that includes Christchurch and that is home to about 612,000 people. By comparison, Boston, with a population of 617,000, employs more than 2,100 full-time officers.
About 30 front-line police officers would be on the streets of Christchurch around lunchtime on an average Friday, said Chris Cahill, a detective inspector who is president of a local labor union for police officers.
When that first panicked call came in, he added, the dispatcher would have sent all of them to Al Noor.
Front-line officers in New Zealand are not armed and for protection wear only stab-proof vests, so those responding to the shootings would have had to pull over and retrieve weapons — a Glock pistol or a semiautomatic M4 rifle — and ballistic armor from the trunks of their cars, Mr. Cahill said.
The police said a special armed tactical unit arrived at Al Noor Mosque four minutes after the first officers, or 10 minutes after the initial emergency call.
Mr. Cahill said it normally would have taken longer, with team members summoned to a police station to suit up. On Friday, though, they happened to be in a training session in the city center and wearing their gear, he said.
“Any police force in the world — to get to the scene in six minutes, a specialist team there in 10 — that would be a success,” Mr. Cahill said.
Patrick Skinner, a former C.I.A. counterterrorism officer now working for an American police department, agreed.
“I’d say that the police response was rather quick in a tactical sense,” he said, noting that the officers were rushing into a violent situation that was still unfolding — and that had been encouraged by individuals espousing bigotry and hatred.
Still, it was not fast enough. The officers arrived to a horrific scene, with the dead and wounded outnumbering the city’s usual on-duty police force.
The authorities have said little about what happened next. It is not clear when ambulances arrived or how many medical workers came. Christchurch Hospital reported receiving several wounded victims in cars driven by relatives.
And then the gunman attacked the Linwood Mosque, almost four miles east of Al Noor.
“The second mosque would have been the real confusion,” Mr. Cahill said. “Calls coming in from one, and then calls saying a second mosque, and people saying, ‘What? Do you mean this mosque or that one?’ ”
Lateef Alabi, the imam leading prayers on the second floor of the Linwood building, said he heard a voice outside at about 1:55 p.m. so he stopped and looked out a window. He saw a man in military gear, wearing a helmet and holding a gun.
Then he saw two bodies on the ground.
He shouted to the congregation of about 80 people to get down. The gunman turned and fired through a window. He kept firing.
Mr. Aziz ran toward him and threw the credit card machine, which was about the size of a large rock.
Both men were relatively short and powerfully built. “He took five, six, shots at me,” Mr. Aziz recalled. “I dove between the cars.”
Following the attacker, he found the shotgun, picked it up and tried to fire it at him, but it was empty.
Mr. Aziz said his children were screaming for him to come back, and the gunman seemed agitated, swearing and talking about “killing you all.”
Earlier at Al Noor, the gunman had returned to his car, retrieved another weapon and gone back inside to kill again. But at Linwood, after Mr. Aziz threw the shotgun at the vehicle — “like an arrow,” he said — the attacker drove away.
“It was like my mind wasn’t working,” Mr. Aziz said. “It was automatic reaction, like anybody. I was prepared to give my life to save another life.”
Officers arrived at the mosque soon afterward, he and other survivors said.
Meanwhile, the authorities had begun locking down the neighborhood and searching for the gunman.
The police said they arrested the suspect nearby at 2:17 p.m., but they have declined to explain how they found him and managed to capture him without an exchange of gunfire.
Officials have confirmed the officers involved were from Lincoln, a town about 20 kilometers, or 12 miles, from central Christchurch. Local media reports said the officers just happened to be in Christchurch on the day of the attack.
A video recorded by a bystander about four kilometers, or 2.5 miles, from Linwood shows the front of a police cruiser wedged into the right side of a sport utility vehicle and tilting it up against the curb on a leafy boulevard.
The suspect’s trunk is open, and one officer with a handgun drawn is approaching the driver’s side door, which is also open. The other officer, armed with a rifle, is circling around the front of the vehicle to back him up.
The first officer, still with gun drawn, pulls a rifle out of the vehicle with his free hand and tosses it on the sidewalk. Then he pulls the suspect out and the two officers subdue him.
It is unclear if the officers or the suspect are saying anything to one another, and whether the suspect put up a fight.
Mr. Tarrant was charged with murder on Saturday. More charges are expected.