SAFE chief executive Debra Ashton said farrowing crates were a cruel and inhumane way of treating pigs and the decision was a step in the right direction.
"This is a brilliant outcome for pigs and it has set a precedent for other codes of welfare for animals," she said.
"We decided to take the matter to court because we had exhausted all other ways for standing up for the mother pigs ... litigation was the only other option for us."
She said the process of phasing the crates out must start as soon as possible.
"There will be a transition period for farmers to move away from the crates but we want to see that happen as possible.
"Mother pigs have suffered for way too long already."
The pork industry said the judgement would have a significant impact on farmers.
New Zealand Pork Animal Welfare Scientist and Advisor Kirsty Chidgey said more than half of pig farmers used farrowing crates. She said it is important to consider piglets in this.
"Piglet crushing is one of the main causes of piglet mortality, and farrowing crates is the best way to stop that."
Chidgey said 60 per cent of pork consumed in New Zealand came from countries overseas with worse animal welfare practices than New Zealand.
"One consequence of this could be fewer farms exist in New Zealand and more pork will be imported from those countries."
Ministry for Primary Industries veterinarian and director for animal health and welfare Dr Chris Rodwell said they would be looking carefully at the judgment before considering next steps and providing advice to ministers.
"We're committed to working with the industry and stakeholders to ensure high animal welfare standards," he said.
- RNZ