US West Coast dockworkers and port operators have reached a tentative deal on a new labor contract, a source close to the negotiations said, averting a shutdown that would have hit about half the country's trade.
The new agreement could free up operations at the ports that have slowed significantly since the labor contract expired in July at key ports for trade with Asia.
A source close to the investigation confirmed the deal to AFP on Friday, but details were not immediately available.
Labor Secretary Thomas Perez oversaw four days of negotiations in San Francisco between the Pacific Maritime Association (PMA), representing management for 29 West Coast ports, and the International Longshore and Warehouse Union (ILWU), representing 20,000 dockworkers.
Perez had warned the two sides to strike a deal for a new dockworker contract now or see talks move to Washington, which would place more federal pressure on the two parties, according to reports.
The National Retail Federation hailed the deal, saying "it is now time for the parties to quickly ratify the deal and immediately focus on clearing out the crisis-level congestion and backlog at the ports."
"As we welcome today's news, we must dedicate ourselves to finding a new way to ensure that this nightmare scenario is not repeated again," added the NRF, the world's largest retail federation.
Since October, the dockworkers have steadily slowed the processing of incoming and outgoing freight at ports that handle about half of the country's trade.
In response, the port owners have cancelled shifts and had multiple-day lockouts to deny the longshoremen holiday and overtime pay.
The result has been a backup of billions of dollars worth of cargo, with heavily-laden container ships lined up outside ports from southern California to the border with Canada.
Pressure grew on both sides to compromise over what has been for weeks the key remaining issue, the arbitration system for labor disputes on the docks.
The ILWU sought more say on who can serve as an arbitrator, amid reports that the union claims the system has become more biased in favor of port management.