New Zealand’s countrywide ban on most semiautomatic weapons has gone into effect.

The ban took effect Saturday after a six-month gun buyback program and amnesty period came to an end, according to The New York Times.

The buyback began as part of a push to stem gun violence following a mass shooting at two mosques in Christchurch in March that left 51 people dead.

More than 56,000 prohibited firearms had been collected from about 32,000 people through the buyback program, according to Minister of Police Stuart Nash. The ban applied to military-style semiautomatic weapons as well as some gun parts.

Nash noted that it was difficult to determine the buyback program’s success, as officials do not exactly know how many guns are in the country, but he added that New Zealand residents were well aware of the program because of the publicity it had received.

“You would have had to have lived under a rock if you were a gun owner not to understand what the government’s doing,” he said.

The Times reported that authorities spent roughly 100 million New Zealand dollars in compensation for guns that had been turned in.

With the buyback program now concluded, those who own banned weapons face the risk of prosecution and up to five years of jail time in addition to the loss of their firearms license.

The ban and buyback program were part of the sweeping gun reform measures New Zealand Prime Minister Jacinda Ardern announced earlier this year following a temporary ban that was enacted days after the deadly shooting at the mosques.

The ban was approved in an overwhelming 119-1 vote in Parliament.