Stories of heroism have emerged from the attacks at two mosques in Christchurch, New Zealand that left 51 people dead.
A 48-year-old Afghan man says he confronted the gunman and threw a credit card machine at him.
Two rural police officers, one of them armed only with a handgun, chased and arrested Brenton Tarrant, 28.
The suspect had explosives in his car and was planning more attacks that day, said Prime Minister Jacinda Ardern.
She had earlier called the killings "an act of terror" and said the bodies of those killed should be returned to relatives for burial by Wednesday.
Tributes have been paid for the victims while some 34 people remain in hospital, including a four-year-old girl who is in a critical condition.
Abdul Aziz, who left Kabul for New Zealand several years ago, said he was inside the Linwood mosque, the second target of the attacker, when he heard shouts that someone had opened fire.
When he realised the mosque was being attacked, he picked up a credit card machine and ran towards the attacker. He threw the device at the gunman when he returned to his car to pick up another weapon, and ducked between cars as the gunman opened fire on him.
Mr Aziz, who was in the mosque with four of his children, picked up a gun that the suspect had dropped and pulled the trigger, but it was empty. He followed the attacker back inside the mosque, where he eventually confronted him again.
"When he saw me with the shotgun, he dropped the gun and ran away toward his car. I chased him," he told Reuters news agency. "He sat in his car and... I threw [the gun] through his window like an arrow. He just swore at me and took off."
Linwood's acting imam Latef Alabi told the Associated Press the death toll would have been far higher at the mosque if Mr Aziz, who said he had not feared the gunman, had not acted.
Two rural community police officers who were nearby chased the attacker, blocked his car and captured him. The moment was filmed by a witness, who posted the footage on social media.
"The officers put New Zealand first," Ms Ardern said on Saturday, adding that they would be recognised for their bravery.
By Jay Savage in Christchurch
Nasir Uddin gazes through the trees in the park towards the exterior wall and golden roof of the Al Noor mosque across the road. With a police perimeter still in place, it's as near as he can get. He looks at the building with tear-filled eyes.
"Now we are very sad," he says shakily as he stands in Christchurch's Hagley Park.
A migrant from Bangladesh, Mr Uddin, 37, moved to this picturesque city on the east coast of New Zealand's South Island more than five years ago. An Al Noor regular, he would have been at the mosque on Friday if he hadn't had to work.
After hearing of the attacks, he began frantically calling people, but no-one answered. He knows at least two of his friends are dead, and is waiting for news on others.
"This thing that we feel is too painful."
The gunman first attacked the Al Noor mosque, about 5km (three miles) away, as people had gathered for Friday prayers. The self-described white supremacist live-streamed it on Facebook.
A video showed 50-year-old Naeem Rashid, originally from the Pakistani city of Abbottabad, apparently trying to tackle the gunman before being shot. He was taken to hospital but later died.
“There were a few witnesses who said he saved a few lives by trying to stop that guy," his brother Khurshid Alam told the BBC. "It's our pride now, but still the loss. It's like cutting your limb off."
Mr Rashid's 21-year-old son Talha - who had just got a new job and was said to be hoping to get married soon - was also killed. The family had been living in New Zealand since 2010.
Pakistan's Prime Minister Imran Khan said Mr Rashid would be honored posthumously.
Also at the Al Noor mosque, 42-year-old Hosne Ara was reportedly in the women's area when she heard gunfire.She was killed while searching for her husband, who uses a wheelchair and survived the attack.
Farid Uddin said his wife had helped several women and children escape from the building as the attack unfolded.
"We feel proud of what she did. She died in a good cause. She did exactly what she loved and what I loved," he told the BBC.
"I lost my wife but I don't hate the killer. As a person I love him," he added. "I forgive him... I pray for him."
Police arrived at the mosque - where at least 41 people were killed - six minutes after an emergency call, Police Commissioner Mike Bush said, and the gunman was in custody within 36 minutes.
On Tuesday, Parliament will pay a tribute to the victims. Other confirmed victims include:
Brenton Tarrant appeared in court on Saturday in a white prison shirt and handcuffs, smiling for the cameras. He has been charged with one count of murder, with more charges expected to follow.
He is the only person charged with carrying out the shootings and is believed to have acted alone, according to Commissioner Bush.