The pork industry will be relying on the support of retailers and consumers as it moves to phase out the use of sow stalls over the next five years.
A new pig welfare code developed by the National Animal Welfare Advisory Committee will restrict use of the stalls within two years, to four weeks during pregnancy, and they will be banned by the end of 2015.
There will also be new time limits on the use of farrowing crates, used on most pig farms to contain the sows while they give birth and raise their piglets.
But there's no phase-out period for those, at this stage.
Agriculture Minister David Carter, who decided the final version of the code, says there's been intense public interest in the issue of pig welfare and he hopes the industry will see the new code as an opportunity..
"New Zealand imports a lot of its pork," he said "and there is now an opportunity for the industry to positively present itself with one of the highest welfare codes in the world and signal that to New Zealanders."
The Pork Industry Board is hoping that New Zealand consumers will recognise the distinction between domestic and imported pig meat.
It estimates that about 40% of sows are still kept in stalls during pregnancy, but that's reducing all the time.
Chief executive Sam McIvor says it will cost an estimated $20 million for those still using the stalls to phase them out, in rebuilding, extra staffing and other costs.
"We expect there will be a fall in productivity as farmers adjust and some will exit the industry, and will be replaced by imports," he said.
"We are asking New Zealand consumers to buy 100% pork bacon and ham.
The new code comes into force at the end of the week.