"What we have now got is an injunction until May 16 that stops the port from pursuing its contracting-out 'bullet-proof' plan," she said, in a caustic reference to a description by company chairman Richard Pearson a fortnight ago of its legal position.
"What the chair described as a route deviation now looks like a very long and winding road."
But Ms Kelly said that if the lockout went ahead "the people of Auckland, the economy of Auckland and the workers involved in this dispute are basically facing a major New Zealand port shutdown until May 16 because of a board that is incapable of managing itself.
"The council and board need to reassess their approach to this port, get it working ASAP and get things back on a sane and normal footing."
Judge Barrie Travis issued the injunction, which the company consented to, , until the court can start a full hearing into a claim by the Maritime Union that the port's bid to contract out jobs before completing collective negotiations is unlawful.
The injunction embodies and strengthens an informal undertaking the company made to the court last week to suspend its contracting-out plan and return to collective bargaining
It was sought after the union said Mr Pearson's statements to news organisations undermined that commitment.
Judge Travis accepted that his description of the company's move as a "route deviation" could imply an intent to "get back to where it wanted to go in the first place".
A statement by Mr Pearson encouraging union members to apply for work with new stevedoring contractors had also "caused difficulties for the undertaking".
But he accepted a company plea for more time, until Friday, to provide an explanation for a letter sent by chief executive Tony Gibson to union members at the end of last week referring to their possible eligibility for voluntary redundancy.
Company lawyer John Haigh, QC, said the letter had an innocent intent, despite being "badly framed and badly timed".
He said the company was offering wages from the end of the strike in good faith, although that offer could not be extended to casual workers, as the strike meant there was no work available to them anyway.
The court will also hear on Friday a union claim that its members have been locked out unlawfully in the meantime, and the company's defence that it has health and safety concerns that need to be worked through.
After yesterday's court hearing the company said that during the formal lockout it would "make every effort" to negotiate a collective agreement with the union.
Helen Kelly said after the hearing that the union would look after casual staff not in line for a pay-day tomorrow, and reserved its right to seek losses from the company's refusal to allow workers back.
"This is how the port treats its casual workforce, with contempt - hardly an advertisement for contracting out is it, which brings in more casualisation."
Neither the port nor union could say yesterday how many casual workers went on strike.e