The government will rush through legislation before the end of the year to allow drug checking at festivals over the summer break.
For several years, volunteers have set up stalls at events to check people's drugs for high-risk substances or dangerous impurities.
They currently operate in a legal grey area, but the promised law change will provide them some protection from prosecution.
In a statement, Minister of Health Andrew Little said the solution would be time-limited while longer-term regulations were developed next year.
"This is not about condoning young New Zealanders' use of drugs. We would prefer they didn't. But the evidence is that when allowed to operate, drug checking services can significantly reduce drug harm."
Little pointed to a preliminary findings out of a Victoria University study which found most people who have their drugs checked change their behaviour and learn more about how to keep safe.
"I make no apology for prioritising young New Zealanders' safety this summer with this law change," Little said.
Labour has the votes to pass the legislation on its own, but the Greens and ACT will also support the move.
Green Party drug law reform spokesperson Chlöe Swarbrick said she was "stoked" to end the year with an important win for sensible drug law reform.
"We know recreational drug use at festivals is going to happen no matter how hard-core the approach," Swarbrick said.
"All drugs carry risk, but pushing people who use them into the shadows makes them riskier."
ACT health spokesperson Brooke van Velden said the legislation would ideally receive greater scrutiny from MPs, but she accepted urgency was necessary given the fast-approaching festival season.
"It's a fact that many people choose to take pills at concerts and festivals, and no-one wants to be the loved-one of a tragic fatality that could have been avoided," van Velden said.
"This Bill does not make drug use legal but it might reduce the harm of drug use."