A Federal Court judge has granted an injunction preventing 97 workers at ports in Sydney and Brisbane from being sacked.

The Maritime Union of Australia (MUA) brought the case after Hutchison Ports made the workers redundant by email and text message last week.

In a late hearing in Sydney Thursday evening, Justice Darryl Rangiah agreed there was a prima facie case that the company had breached an enterprise agreement entered into with the union.

Justice Rangiah ordered that the workers not be made redundant pending a full hearing of the dispute at the end of the month.

The company must now continue to pay their wages at least until the full hearing on August 31.

It had earlier blamed the redundancies on a number of issues, including the downsizing of its offerings to Australian customers.

In front of a gathering of workers at Port Botany in Sydney, MUA NSW branch secretary Paul McAleer called the decision "historic".

"We've nearly been down here for a full week — day, night, wind, rain, sun," he said.

"What we've basically won is the first battle in this war.

"And we are very hopeful that this company comes to its senses and recognises that there is an enterprise agreement in place that has been negotiated and democratically endorsed by the leadership and it needs to be upheld."

The industrial action at the ports in Sydney and Brisbane, which went into its seventh day on Thursday, is now expected to halt following the court's ruling.