– A father and son who fled the civil war in Syria for "the safest country in the world" were buried before hundreds of mourners Wednesday, the first funerals for victims of shootings at two mosques in New Zealand that horrified a nation known for being welcoming and diverse.

The funerals of Khalid Mustafa, 44, and Hamza Mustafa, 15, came five days after a white supremacist methodically gunned down 50 worshipers at two mosques in Christchurch. Police said Wednesday they believe he was on his way to a third attack when officers ran him off the road and arrested him. They declined to release any more details, citing the active investigation.

During the funerals, Hamza's high school principal described the student as compassionate and hardworking, and said he was an excellent horse rider who aspired to be a veterinarian.

Those present included Hamza's younger brother, 13-year-old Zaed, who was wounded in an arm and a leg during the attack. The boy tried to stand during the ceremony but had to sit back in his wheelchair, one mourner said.

"We tried to not shake his hand, and not touch his hand or his foot, but he refused, he wanted to shake everybody's hand, he wanted to show everyone that he appreciated them. And that's amazing," said Jamil El-Biza, who traveled from Australia to attend the funeral.

The Mustafas had moved to New Zealand last year after spending six years as refugees in Jordan. Mustafa's wife, Salwa, told Radio New Zealand that when the family asked about New Zealand they were told "it's the safest country in the world, the most wonderful country you can go ... you will start a very wonderful life there."

She added, "But it wasn't."

Prime Minister Jacinda Ardern said the family should have been safe.

"I cannot tell you how gutting it is to know that a family came here for safety and for refuge," she said.

Four other burials were underway on Wednesday evening. Those victims include Junaid Ismail, Ashraf Ali and Lilik Abdul Hamid. The fourth victim's name was suppressed by court order.

Families of those killed had been awaiting word on when they could bury their loved ones. Police Commissioner Mike Bush said police have now formally identified and released the remains of 21 of those killed. Islamic tradition calls for bodies to be cleansed and buried as soon as possible.

Also on Wednesday, a man accused of sharing video footage of Friday's massacre was jailed by a judge until his next court appearance in mid-April. And Bush said he believes police officers stopped the gunman on his way to a third attack.

Brenton Harrison Tarrant, a 28-year-old Australian man, has been charged with murder and is next scheduled to appear in court on April 5. Police have said they are certain Tarrant was the only gunman but are still investigating whether he had support from others.

Philip Arps, 44, appeared in a Christchurch court Wednesday on two charges of distributing the killer's livestream video of the attack on the Al Noor mosque, the first mosque that was attacked, a violation of the country's objectionable publications law. Each charge carries a maximum sentence of 14 years in prison.

Charging documents accuse Arps of distributing the video on Saturday, one day after the massacre.

Abizar Valibhai, of Christchurch, said Wednesday's burials marked an important moment.

"It's not only for the Muslim community, but for the whole of New Zealand, and the world as well," he said. "If we don't show our support at this time, when are we going to show it?"

He said there would be many waves of emotions to come for the families of the victims.

"They are fathers, they are mothers, they are brothers, they are sisters, they are wives," he said. "There are a lot of things that will be shattered."