In a statement, Auckland Council said it had received the judgment and would consider it over the next few days.
"The Court determined that the multiple consents required should have been "bundled", leading to a broader consideration of adverse effects, and that special circumstances existed requiring notification.
"The ruling means the Ports' resource consents for the B2 and B3 extensions to Bledisloe wharf, granted last year, are no longer valid," the statement said.
Today's ruling by Justice Geoffrey Venning is a huge victory for Urban Auckland, a society of architects and professional planners, which challenged the lawfulness of the consents in the High Court at Auckland in early June.
Urban Auckland spokeswoman Julie Stout was ecstatic.
"We always knew it was the right thing to do bringing this case and we have been completely vindicated," she said.
The society's lawyer, Dr Matthew Palmer, QC, said the ports company had two options. It could appeal the decision or apply for new consents.
Dr Palmer said Justice Venning had said the resource consents should have been notified for two reasons and therefore he had set them aside.
The judge said the decision to proceed without notification was flawed for two reasons.
He said the multiple consents should have been bundled "which would have required notification, as the most restrictive activity was a discretionary activity".
Alternatively, the judge said, a "special circumstances" clause existed which required notification in this case.
"The Commissioners fell into error in determining that because the extension was a controlled activity and an expected development no special circumstances existed so that it was unnecessary to notify in any event," Justice Venning said.