New Zealand's ban on military-style semi-automatic weapons and assault rifles went into effect on Friday.

The legislation came after a gunman killed 50 people at two mosques in Christchurch on March 15.

The country's House of Representatives overwhelmingly passed the bill at its final reading on Wednesday, and the governor general gave it the Royal Assent — a constitutional formality — on Thursday.

Prime Minister Jacinda Ardern made a rare appearance at the bill's final reading and paid tribute to the victims of the massacre.

Visit INSIDER.com for more stories.

New Zealand's new ban on many types of firearm went into effect on Friday, April 12, after the country's government overwhelmingly passed new legislation earlier this week.

The House of Representatives passed the Arms (Prohibited Firearms, Magazines and Parts) Amendment bill at its third and final reading 119-1 on Wednesday night after an expedited process.

The bill received Royal Assent from New Zealand's Governor-General on Thursday. The process is in practice a formality, and assent has never been withheld before. Under New Zealand law, acts come into force the day after the royal assent is given.

Members of the public following a shooting at the Al Noor mosque in Christchurch on March 15. REUTERS/SNPA/Martin Hunter

It means New Zealand's legislative response to the mass shooting in Christchurch, where 50 people were killed, was completed in four weeks, or 28 days.

The new law bans the circulation and use of military-style semi automatic weapons, assault rifles, and its associate parts.

The law's swift passage was prompted by widespread revulsion at the deaths in Christchurch, at the hands of a gunman who used legally obtained weapons to fire on worshippers at two mosques.

Brenton Tarrant, a 28-year-old Australian man and suspected white supremacist, has been charged with carrying out the massacre.

Read INSIDER's full coverage of the New Zealand shootings here.

Ardern attends Friday prayers at Hagley Park outside Al-Noor mosque in Christchurch on March 22. Jorge Silva/Reuters

'We are here because of them'

Jacinda Ardern, New Zealand's prime minister, made a rare appearance at the final reading of the legislation on Wednesday night.

She said she felt compelled to legislate quickly after Police Commissioner Mike Bush told her that the gunman had obtained his weapon within the law.

"I could not fathom how weapons that could cause such destruction and large-scale death could have been obtained legally in this country," she told the House. "I could not fathom that."

"I could not hand-on-heart go down and face not just the media, not just the public, but the victims that had been left behind from this terror attack and tell them hand-on-heart that our system and our laws allow these guns to be available and that was okay. Because it was not."

Read more: The Christchurch shooting suspect appeared in court via a video link, seeing victims for the first time since the attack. Some were still in wheelchairs and hospital gowns.

People attend prayers outside Al-Noor mosque in Christchurch on March 22. REUTERS/Edgar Su

"I made a decision after that briefing that I would go down that day and, without having the chance to question the Parliament, know that Parliament would be with me," Ardern added. "And they were."

She also paid tribute to the victims of the massacre, saying: "I struggled to recall any single gunshot wounds. In every case, they spoke of multiple, debilitating injuries ... We are here because of them. I believe they are here with us."

Watch Ardern's speech here:

from on Vimeo.

Six days after the massacre, Ardern announced her intention to ban the semi-automatic weapons and assault rifles, as well as a ban on selling or possessing those weapons as an "interim measure" while legislation is prepared.

The government also introduced a gun buyback scheme, which will offer cash incentives and amnesty to those still in possession of the weapons. The program is estimated to cost between $NZ100 to $NZ200 million ($69 to $138 million).

Read more: New Zealand announced sweeping new gun laws that may cost the country up to $138 million. Here's how they will work.

It grants an amnesty until September 30, 2019, for people to surrender prohibited firearms.

New Zealand police expect tens of thousands of firearms to be handed over as part of the new legislation, Reuters reported. More than 300 weapons have been surrendered so far.