A High Court judgement released on Friday has found the minimum standards of farrowing crates and mating stalls for pigs are "unlawful and invalid" and has directed the Minister of Agriculture to "consider recommending new regulations phasing [them] out".
The case was filed by animal rights group SAFE and the New Zealand Animal Law Association (NZALA) against the Attorney-General, the Minister of Agriculture and the Animal Welfare Advisory Committee (NAWAC).
Mother pigs are put into farrowing crates before and after they give birth, to prevent them crushing their piglets.
The practise has long been viewed as inhumane by animal rights groups, as it doesn't allow them to perform much of their natural behaviour.
But the pork industry says they are essential because they protect piglets by making it less likely for them to be crushed by their mother while in a crate.
The High Court has now ruled that the Government acted illegally by not setting a date by which the crates must be phased out.
The court ruled that regulations and minimum standards that allow farrowing crates are inconsistent with the Animal Welfare Act 1999, saying they are "unlawful and invalid".
The court directed the Minister of Agriculture to "consider recommending new regulations phasing out the use of farrowing crates and mating stalls''.
The judgement was welcomed by SAFE and NZALA, who said it was a "historic day for animals".
"After exhausting all other avenues to free mother pigs from cages, we had no other option but to take this landmark case to court," said SAFE chief executive Debra Ashton.
She said the case was about giving mother pigs the freedom to live more natural lives and respecting them as sentient, instead of treating them as simply "units of production".