The Government says amendments to bail laws will make the public safer.
A bill changing the test that courts apply when determining bail applications was passed into law by 106 votes to 7 on Friday night.
At present, defendants have to present a "real and significant risk" to be denied bail by the courts.
But under the bill, defendants who present only a risk, can be denied bail.
The Greens and the Maori Party voted against the bill, which was passed under urgency.
Justice Minister Simon Power says this bill will make courts put public safety first and the Government will be implementing further campaign pledges around the bail system.
The Labour Party voted in favour to amend the bill it introduced last year. Although the party says the legislation is without substance and will affect very few people, it supports the bill.