Australia's Federal Court rejected Thursday an appeal by a ship-loading company that insisted its mass firing of all 1,400 unionized dock workers was legal.

The court ordered the company, Patrick, to rehire the workers - a stunning setback for the conservative government's campaign to crush the Maritime Union of Australia, which it claims has a monopoly on waterfront jobs.The firings two week ago touched off a struggle for control of the nation's docks, with the union setting up pickets that blocked cargo and disrupted factory production and other commerce.

At Melbourne's East Swanson Dock, dock workers raised their fists in victory when the court ruling was broadcast live on television and radio, applauding the decision.

After firing the 1,400 dock workers on April 7, Patrick used private security guards and attack dogs to move them off the docks. The company claimed the union was too inefficient.

Prime Minister John Howard's government backed Patrick, saying its actions were essential to long overdue waterfront reforms.

The Maritime Union of Australia responded to the Patrick firings by putting up picket lines to blockade Patrick's terminals at major ports.