A recent High Court decision ruling that farrowing crates for pigs are unlawful is "precedent-setting", a law expert says.
Mother pigs are put into farrowing crates before and after they give birth to prevent them crushing their piglets.
The pork industry says the crates are essential to protect piglets, but animal rights groups say they are cruel as they don't let pigs perform their natural behaviour.
But in a court decision released last Friday, the High Court said minimum standards for farrowing crates and mating stalls were unlawful, and recommended the Agriculture Minister consider bringing in new regulations to phase out their use.
Marcelo Rodriguez Ferrere, a senior law lecturer at the University of Otago, says the case - brought to court by animal rights group SAFE and the NZ Animal Law Association - was important not just because of the result, but because it was the first time the country's animal welfare code has ever been challenged.
"This is the first time that anything like this happened - an organisation, or anyone really, challenging something that appears in animal welfare, codes of welfare or regulations made under the Animal Welfare Act," Ferrere told Newshub.
"It's an important thing in and of itself, even if it didn't go the way that it did," he said, adding that it was an "important and substantive victory" for animal rights groups.
"It's precedent-setting in that it was enlightening in terms of the criticism of the process that leads to these sorts of standards, and the repeal of these standards themselves is a huge win."
Ferrere says one major impact the ruling could have is that "opens the door for further challenges".
"I don't think they're going to flood through because it's still expensive to take these sorts of challenges..but it certainly set the precedent."
The case was brought against the Attorney-General, the Minister of Agriculture and the National Animal Welfare Advisory Committee (NAWAC).
NAWAC is the body responsible for overseeing the codes of animal welfare and the regulation-making process. Ferrere says when it was creating the Codes of Welfare for pigs in 2005 and 2010 NAWAC wanted to see both farrowing crates and mating stalls eventually phased out. However, it changed its position in 2016, stating they were consistent with the act. But that position has now been called unlawful.
Ferrere says following the High Court ruling, the body would need to "take a long hard look" at the way it does business.
"The criticism of the way these decisions were made was so clear that I think they're not going to be able to continue business as normal."
Dr Chris Rodwell, veterinarian and director for animal health and welfare for the Ministry for Primary Industries (MPI) said the ministry acknowledged the court's decision.
"We are looking carefully at the judgment before considering next steps and providing advice to ministers," he said.
"We're committed to working with the industry and stakeholders to ensure high animal welfare standards."
Impact on the pork industry
The pork industry says it's "disappointed" with the ruling and maintains the crates are the most effective way of protecting piglets from being crushed.
"The decision is disappointing and has led to a great deal of uncertainty," David Baines, chief executive of Pork NZ, told Newshub.
Baines pointed out that the judge's scope was "to review the legal process that was undertaken to develop regulations and codes of welfare rather than specifically addressing the use of indoor farrowing systems".
"Our sector follows world-leading animal welfare practices. Farrowing or birthing systems are essentially maternity wards for sows. They support the survival of as many well-grown healthy piglets as possible, whilst also meeting the needs of the sow. In 2016, NAWAC concluded that the use of farrowing crates was the best system available to meet the welfare needs of the piglets and the sow."
He says the farrowing crates system is "the most effective at protecting piglets from being crushed by their mothers" but Ferrere insists "it's not absolutely necessary" to use them, and points to research suggesting only 0.4 piglets are saved on average through their use.
It's estimated around half of the country's pig farms use farrowing crates.
Baines said most of the country's approximately 100 commercial pig farmers use a mixture of farrowing systems.
"Around half of the commercial sow herd are on indoor farms, most with farrowing crates. A couple of farms are using farrowing pens indoors, but less than 3 percent of the indoor commercial herd would be housed in this system."
Sows spend a maximum of 28 days in the system after giving birth, he said.
Using an alternative system, such as a pen, would be more expensive to install due its larger footprint, and would lead to existing buildings that use farrowing crates having fewer sows if they had to be converted. Because farms would be unable to invest in both converting their existing systems and in constructing new buildings in order to retain their current herd levels "this would reduce the number of pigs produced each year".
Baines says "there is no question" banning standard farrowing or birth systems would "wipe out a significant part of pig farms and force New Zealanders to rely on imported pork using practices currently illegal in this country".
He said it's "not viable" for the industry to move to an entirely outdoors-based system - and with half the industry potentially affected by a move to phase out farrowing crates, it would have a "major impact" on the sector.
It could also force many farmers unable to justify the extra costs to exit the industry - something that would end up impacting consumers, he said.
"Ultimately, a drop in domestic pork production will be made up by an increase in imported pork. This is already 60 percent of pork consumption in New Zealand and is produced at a much lower cost that New Zealand farmers can't compete with, and with lower welfare standards."
Baines said the industry would also expect financial support from the Government for affected farmers to complete the necessary changes to their facilities and to also compensate them for loss of productivity.
But even if there are financial repercussions for the industry, Ferrere says it's a small price to pay in the long run.
New Zealand is "quite out of step" with international practices, and the move to phase the crates out "should have happened decades ago", he says.
"So even if there is an impact on the industry, it's one that they should have seen coming - and basically it's one that it should bear."