Egg producers have a decade to phase out the use of battery cages for layer hens under a new welfare code issued on Thursday.
The Minister for Primary Industries, David Carter, issued the code after the National Animal Welfare Advisory Committee reviewed how layer hens are housed.
Committee chair John Hellstrom says battery cages house three to five hens and restrict them from expressing a range of normal behaviours, such as perching, pecking and scratching.
From Friday, battery cages will no longer be allowed to be installed and existing cages will be progressively taken out of use over the next 10 years.
Farmers will be able to house their hens in colony cages or barns under the new code.
But the Green Party says the Government has missed an opportunity to stop the cruel treatment of chickens kept in cages.
Animal welfare spokesperson Mojo Mathers says New Zealanders who care about animal welfare have been let down by the decision to continue to allow "cruel" cages for egg-laying hens.
Ms Mathers says colony cages do not meet the fundamental purpose of the Animal Welfare Act and the use of them is just a loophole to allow factory farms to continue to keep animals in cruel conditions.