Attempts to eradicate the cattle disease Mycoplasma bovis will continue, the prime minister has announced.
Prime Minister Jacinda Ardern has just announced the decision about whether to eradicate or contain the disease at a special post-Cabinet press conference at Federated Farmers' Wellington headquarters.
It will be a 10-year phased eradication, although most of the work will happen over the next one to two years, and will cost about $886 million.
The disease was discovered in July last year and since then 41 farms have been confirmed as infected. That has since dropped to 37 farms, with more than 11,000 cattle slaughtered.
The bacterium causes illness in cattle, including udder infections, abortion, pneumonia and arthritis.
It does not affect humans and MPI said it presents no food safety risk.
The eradication plan will involve culling all cattle on all infected properties as well as cattle on any 'restricted' properties.
After the cull, farms will be disinfected then lie fallow for 60 days, after which stock can be returned.
The Ministry for Primary Industries will continue to trace all potentially affected cattle, testing and culling any herds with infected animals.
Of the total cost, $16m will be from loss of production and will be borne by farmers. The vast majority - $870m - covers the cost of the response, including compensation to farmers.
The government will meet 68 percent of this cost, with Dairy NZ and Beef and Lamb picking up the rest.
The alternative of long-term management would have cost about $1.2bn.
Ms Ardern and Primary Industries Minister Damien O'Connor said the government has "one shot" at eradicating a disease that causes a "painful, untreatable" illness in cattle.
"This is a tough call - no one ever wants to see mass culls, but the alternative is to risk the spread of the disease across our national herd," Ms Ardern said.
Mr O'Connor said he was sending his thoughts to farmers already affected by M. bovis.
"Our heart goes out to them.
"Farmer welfare is at the forefront of everything we are thinking about."
There was only one strain of M. bovis in New Zealand and the government believed it know where it came from, Mr O'Connor said.
Mass culls were necessary because there was no test that was completely reliable in detecting the disease, he said.
The government was working through 23 recommendations from an independent review committee.
Awareness of the value of the National Animal Identification and Tracing programme - which is currently voluntary - had upped substantially, Mr O'Connor said.
There was not a farmer in New Zealand who would not now be aware of its value.
Decision supported by industry bodies
Dairy NZ said it supported the decision.
Chair Jim van der Poel said farmers had been waiting nearly 11 months month and "part of the challenge" had been a lack of certainty about what was going to happen.
"We know that moving towards eradication will be a devastating decision for some [as it] will mean that thousands of animals will have to be culled."
Dairy NZ would be there to support each individual farmer affected.
The decision represented hope that New Zealand could still be rid of the disease, he said.
"We have one chance to do so, and we don't want to regret not taking that chance."
Beef and Lamb NZ chair Andrew Morrison said the decision could have gone either way, "but the key thing is that eradication is only on the table for a limited time".
Rural Women NZ and Federated Farmers both said they would be making sure there was wrap-around support for affected farmers.
Farmers who RNZ has spoken to are divided about the best way to handle the disease, with some saying containment was the only realistic solution.
National Party agriculture spokesman Nathan Guy, who attended the government announcement, said the decision would bring "a significant level of certainty" to farmers.
"I'm pleased a decision has finally been made and that an agreement has also been struck to share the costs of this response between industry and government."
The issue was "bigger than politics" and had caused enormous stress and anxiety for farming families, he said.
"I know that some farmers would prefer to be left to manage this disease rather than having their animals culled.
"Industry and government must have a high degree of confidence from international scientists that eradication is both feasible and practical," he said.
He was also pleased the government would speed up the compensation process for farmers whose herds were affected, with interim payments to be made within a fortnight of stock being culled.