The Supreme Court ruling on container cargo appeared yesterday to clear the way for early contract settlement between the International Longshoremen's Association and shippers in major East Coast and Gulf Coast ports.

The head of the longshore workers' union hailed yesterday's Supreme Court decision as an important victory for his union, and the administrator of the Port of Baltimore said it cleared away a major obstacle to settling the dockworkers' contract before it expires, probably precluding a strike that would deal a serious blow to an already suffering economy.

In a 5-to-4 decision, the justices ordered the National Labor Relations Board to reconsider whether the longshore workers legally are entitled to the work, the outgrowth of mechanization on the docks.

What triggered the longstanding dispute was a change in the way cargo is moved to and from the docks. Before the advent of containers, trucks had to be hand-loaded and unloaded at the docks by longshoremen. Now containers simply can be unhitched from trains or trucks and lifted by a crane onto ships.

The union sought a role in handling container cargo to protect the jobs of its members, and the shippers agreed to a compromise which allowed dockworkers to handle some, but not all, container freight.

At issue are thousands of union jobs up and down the East and Gulf coasts and 10 percent to 20 percent of the work the ILA handles, ILA President Ted Gleason said. The losers in that compromise were the freight-handling companies -- frequently nonunion -- that dealt in container cargo.

In a series of limited decisions, the NLRB had held that container-cargo work rules negotiated by the longshore workers and shippers were an illegal extension of the union's traditional jurisdiction and that the dockworkers were not entitled to the work.

The decisions had a limited impact in removing work from the union's juurisdiction because they covered only individual freight forwarders or warehouses that questioned the rules. The ILA continued to do most of the loading and unloading of containers within 50 miles of the docks, but the legality of the rules that allowed the union to do so was left in doubt.

What the court ruled was that the NLRB must decide the issue using other standards than it had applied, apparently including the impact of mechanization on workers who lose their jobs.

Whether that impact will change the NLRB's opinion about the legality of the rules is still up in the air. In the meantime, however, the contractual rules apparently apply.

"This decision now justifies everything we believed we had way back when we agreed to the mechanization of the docks," said ILA President Gleason. "It's a victory for us because we have traditionally been doing this work."

"We're very happy about it," said William Detweiler, president of the Steamship Trade Association of Baltimore and the Council of North Atlantic Shipping Associations. "Seemingly, it brings back the work to where it always was and alwlays belonged."

In May, shippers and the ILA agreed to a master contract conditioned on settlement of local issues and the outcome of the Supreme Court case. If the court had upheld the NLRB, the issue of container cargo would be reopened and could have delayed settlement substantially.

"I talked to both sides, and I think both sides were relieved by the decisions, which will expedite settlement of a contract," said Baltimore Port Administrator W. Gregory Halpin. "Both the ILA and maritime management were together in this case. Both supported the rule," he said.