(CNN) New Zealand's parliament has voted almost unanimously in favor of changing the country's gun laws, less than a month after a mass shooting left 50 people dead.

Members of parliament voted 119 to 1 in favor of the ban on military-style semi-automatic weapons Wednesday, as Prime Minister Jacinda Ardern told lawmakers they were giving "a voice" to those killed in the Christchurch massacre.

Once the bill is granted royal assent by the country's governor-general, it could come into force as law as soon as Friday, TVNZ reported.

The passage of the bill comes just weeks after the March 15 mass shooting at two Christchurch mosques, which Ardern described as "the darkest of days in New Zealand's history."

"We are ultimately here because 50 people died, and they do not have a voice," she told parliament Wednesday. "We in this house are their voice, and today, we have used that voice wisely."

Read More