The measures come ahead of a planned national referendum on recreational marijuana use. The government has pledged to hold the referendum some time over the next two years, but has not yet set a date or finalized the wording.

The legislation will also allow terminally ill patients to begin smoking illegal pot immediately without facing the possibility of prosecution.

WELLINGTON, New Zealand — New Zealand’s government on Tuesday passed a law that will make medical marijuana widely available for thousands of patients over time.

The new law allows patients much broader access to medical marijuana, which was previously highly restricted. But most patients will have to wait a year until a new set of regulations, licensing rules and quality standards are put in place.


The law will also allow medical marijuana products to be manufactured in New Zealand for both domestic and overseas markets.

Health Minister Dr. David Clark said in a statement the new law will help ease suffering.

‘‘This will be particularly welcome as another option for people who live with chronic pain,’’ he said.

He said the 25,000 people who are in palliative care with terminal illnesses didn’t have time to wait for the new scheme, and so the law provided a legal defense for them to use illegal marijuana.

‘‘People nearing the end of their lives should not have to worry about being arrested or imprisoned for trying to manage their pain,’’ Clark said.

But the opposition’s health spokesman, Dr. Shane Reti, said the new law is ‘‘lazy and dangerous’’ because it doesn’t provide details of the planned medical marijuana scheme, and would also allow some people to start smoking pot in public.

‘‘We support medicinal cannabis but strongly oppose the smoking of loose-leaf cannabis in public,’’ Reti said. ‘‘Smoked loose-leaf is not a medicine.’’

Reti said the new law amounted to decriminalizing marijuana by stealth.