WELLINGTON, New Zealand — More than 150 gun owners turned in semi-automatic 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, 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 semi-automatic 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,” 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.

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 plan 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 semi-automatic 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, 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.