WELLINGTON   -   More than 150 gun owners turned in semiautomatic weapons and gun parts to the police in Christchurch, New Zealand, on Saturday, the first day of nationwide gun buyback events after the government banned most such firearms in the wake of a terrorist attack on mosques in the city.

Mike Johnson, the commander of the district’s police department, told reporters that gun owners would be paid a total of close to $300,000 for the 224 now-illegal weapons handed over during the five-hour event.

It took place in the same city where on March 15, a lone gunman stormed two mosques, killing 51 people and injuring dozens more in an attack that rattled the nation and prompted calls for dramatic changes to gun laws.

New Zealand’s prime minister, Jacinda Ardern, announced six days after the attacks that most semiautomatic weapons, including all of the military-style firearms used by the gunman, would be outlawed. Three weeks later, the country’s Parliament overwhelmingly passed a law banning them.

“New Zealand stands apart in its widespread availability of weapons of such destructive nature and force,” Ms. Ardern said at the time. “Today that anomaly ends.”

On Saturday, gun owners lined up for an hour and a half before the venue opened for the first of 258 buyback events to be held around the country over the next three months.

Ms. Ardern predicted it would cost the government between $60 million and $130 million to buy back the banned weapons, but other politicians and some critics have said the scheme is likely to be more costly.

The prime minister frequently refers to New Zealand’s neighbor, Australia, when she speaks about the change to gun laws. After a gunman killed 35 people with a semiautomatic weapon in the Tasmanian town of Port Arthur in 1996, Australia enacted sweeping restrictions on firearms, and its government bought back more than 650,000 guns.

While reporters had earlier been invited to attend the Christchurch buyback, outcry from some groups representing gun owners — who said they feared those turning in weapons would be vilified — led the police to bar media from the venue while gun owners were there.

After the end of Saturday’s event, Mr. Johnson, the police commander, said he was “ecstatic” with the turnout and with what he saw as positive interactions between gun owners and officers.

“I didn’t see any angst in the room,” he said.

Mr. Johnson said around a dozen weapons were also handed in under amnesty provisions, where their owners did not receive compensation but will be immune from prosecution for possessing them.

Nicole McKee, a spokeswoman for the Council of Licensed Firearms Owners, a lobby group, said some of those who attended Saturday’s event had told her they were satisfied with how they had been compensated.

But, she said, “the majority” of those she had spoken with were not.

“They were surprised that they were not able to leave with their firearms when they heard the prices and were not happy with them,” she said.

Gun owners receive 95 percent of what police have determined is a “fair market value” for weapons in new or near-new condition, 70 percent for those in average condition, and 25 percent for those in poor or inoperable conditions.

The definition of fair market value has proved controversial, and Ms. McKee said the compensation package needed to improve if officers wanted more participation from gun owners.

In addition to firearms, more than 217 banned parts were also handed in. Accessories that can convert lower-powered guns to higher-powered versions were also outlawed in April.

Before the buyback event, which will continue on Sunday, 900 people in the Canterbury district where Christchurch is registered online to indicate they planned to relinquish weapons.

Despite the much smaller turnout of 169 people on Saturday, Mr. Johnson said he still expected the rest of those who had registered to hand over their guns at other buyback events.

Gun owners can also turn in banned weapons at police stations or through approved dealers. Those with more than 10 guns to relinquish can ask the police to visit their homes to pick up the weapons.

Ms. McKee, the spokeswoman for the gun owners’ group, said many of its members were unhappy they were being forced to relinquish their guns when unlicensed owners were less likely to do so.

“People are quite upset that they have been targeted when the people who are illegally in possession, and committing crimes with firearms, haven’t been targeted,” she said.

But the police say they are trying to seize unregistered firearms. Earlier this month, Stuart Nash, the police minister, said officers had seized more than 1300 illegal guns since the March attack.

“Many of these weapons are from gangs and offenders without firearms licenses,” he said.

He added that more than 800 guns had also been voluntarily turned into the police before the buyback events began.

The 2017 Small Arms Survey estimated that there were about 1.2 million guns in New Zealand, which has a population of 4.8 million.