The High Court has quashed mining company Trans-Tasman Resources' consents to mine ironsand in the South Taranaki Bight.
The company had been given consent by an Environmental Protection Authority (EPA) decision-making committee, on chairman Alick Shaw's casting vote.
The decision was appealed to Wellington High Court by seven parties, including iwi, fishing interests and environmental group Kiwis Against Seabed Mining (KASM).
It was heard over four days in April, by Justice Peter Churchman and his decision was released to the appellants on Tuesday.
The appellants are overjoyed by the decision with KASM chairwoman Cindy Baxter in tears.
"We have won the whole thing. The judge has quashed the whole decision and sent it back to the EPA. It's a victory for the people in the South Taranaki Bight," she said.
The decision said it was unlawful to go ahead with the mining and set conditions for it once the effects were known - a process known as adaptive management.
"We argued it was illegal the whole way through. It's not allowed in EEZ (exclusive economic zone) legislation," Baxter said.
The judge sent the decision back to the EPA "for reconsideration, applying the correct legal test in relation to the concept of adaptive management approach."
Ngā Rauru CEO Anne-Marie Broughton was equally happy.
"It's a relief, and it's such a tribute to everyone. All those people up and down across the country that have come out and done their bit to oppose seabed mining. This is a huge win for our community, our society, and for Tangaroa [guardian of the sea]. The mana of Tangaroa has prevailed. It always has and it always will."
Another major appellant was Ngāti Ruanui. Its CEO Debbie Ngarewa-Packer was delighted.
"The decision making committee and Trans-Tasman Resources can appeal but we've fought and won twice. I think that will put them off," she said.
Fisheries Inshore New Zealand also welcomes the decision.
"This is a good decision by the High Court and we are pleased this matter has again been rejected. It is clear from these failed attempts that a significant re-think is required on seabed mining," chief executive Dr Jeremy Helson said.
The EPA has noted the decision and will now carefully consider the judge's findings and their implications.
"As parties have the option to appeal, we will not be making further comment," its spokesperson said.
Trans-Tasman Resources (TTR) has previously indicated it is likely to appeal.