Striking dockers have obtained court permission to return inside the Kwai Tsing Container Terminals to continue picketing, but their numbers must not top 80.
Jubilant workers called the High Court ruling a "substantial victory" in their fight for better pay and working conditions.
The strikers, who run into the hundreds, had been restrained since Monday in their right to picket in the premises by an injunction sought by port operator Hong Kong International Terminals (HIT) to keep them out.
Yesterday, Madam Justice Mimmie Chan Mei-lan relaxed the order, saying they could picket at a car park next to their previous protest site under a canopy.
Outside court, unionist lawmaker Lee Cheuk-yan, who was among 14 strikers identified by HIT, said: "We welcome the court's decision. We will continue with our fight."
Chan's decision meant HIT failed to get the Court of First Instance to continue the original injunction, which expired yesterday. However, she dismissed an application by the 14 to set aside the injunction completely.
The latest turn of events came after the workers had been camping along Container Port Road South outside the terminals for about four days. Previously, they occupied a roundabout that led to terminal six, and a canopy that sheltered them when it rained.
More than 500 contracted workers at the Kwai Tsing port launched the walkout on March 28. They want the contractors that employ them to discuss their demands for a 17 per cent pay rise and improved work conditions.
Chan said the scope of the original order was too wide. She amended the terms so as to strike a balance between HIT's private property rights and the workers' right of peaceful picketing under section 46 of the Trade Unions Ordinance, she said.
She noted there had been no evidence of the workers engaging in violence or unlawful acts.
Under the order, 80 people are allowed to gather at the car park "merely" for peacefully obtaining or communicating information or peacefully persuading any person to work or abstain from working. Lee had suggested allowing 100 participants and HIT had proposed 10.
Chan said the picketers must not trespass on the terminals or commit any unlawful acts, such as breaching the peace or obstructing HIT employees from getting in and out of the port.
Since not all the picketers were members of the Confederation of Trade Unions, the organisers of the strike, HIT must advertise the injunction in a local newspaper and send a copy of it to the union, she ordered.
HIT immediately asked for permission to appeal, saying the injunction required the firm to give up its right of private property. Chan granted her approval.
Earlier, Lee asked that they be allowed to resume picketing at six lanes under the canopy. Chan raised questions on the safety of demonstrating on the road and accepted HIT's proposal to allow picketing in the car park.