Parliament has passed the legislation that will regulate the sale of legal highs.
The third reading of the Psychoactive Substances Bill was passed on Thursday with the opposition of only ACT leader John Banks.
Mr Banks was voting in protest after attempts by him, the Greens and other Opposition parties failed to bring in stricter provisions on animal testing.
The legislation will require manufacturers of party pills and synthetic cannabis to prove that their product is safe before being able to sell it in New Zealand.
Once the bill gets the Royal Assent it will become law. When that happens, dairies and service stations will have to clear their shelves until a product has been approved under the new law.
The sale of legal highs will be illegal to those aged under 18.