The New Zealand parliament passed the Arms Amendment Bill after its third or the final reading Wednesday night, less than a month after the Christchurch mosque attacks which killed 50 people.
The proposed new gun bill, namely The Arms (Prohibited Firearms, Magazines and parts) Amendment Bill, won overwhelming support in the parliament, as it was passed by a vote of 119 to 1.
The bill is expected to receive its Royal Assent from the governor on Friday before it becomes law, when military-style semi-automatics (MSSAs) and assault rifles and associated parts will be illegal.
Possession of prohibited firearms could face a jail term up to five years, according to the bill.
It is understood that compensation will be available for firearms and parts based on make, model and condition, but only for items that were lawfully obtained.
New Zealand Prime Minister Jacinda Ardern was the first to speak during the reading of the bill. She said she was proud of the work that had been done to get the bill passed.
The New Zealand government had vowed to ban MSSAs soon after the Christchurch terrorist attacks, which also injured dozens on March 15.