A threatened strike at container ports from Boston to Houston has at least temporarily been averted, a federal mediator said Friday.

George Cohen, director of the Federal Mediation and Conciliation Service, said in a statement that groups representing dock workers and management at the ports had agreed in principle on the key sticking point in the talks: royalty payments the dock workers get for each container they handle. The deal is subject to the achievement of an overall collective bargaining agreement.

The talks will be extended into next year for the two sides to resolve other outstanding issues, with a new deadline of Feb. 6. The dock workers had threatened to strike on Dec. 30 in the absence of a deal.

"While some significant issues remain in contention, I am cautiously optimistic that they can be resolved," Cohen said. He declined to disclose details on the container royalty agreement, but said it represented "a major positive step toward achieving an overall collective bargaining agreement."

The U.S. Maritime Alliance, which represents management at the ports, terminals and shipping lines, declined to comment beyond the government statement. The International Longshoremen's Association, representing the dock workers, did not immediately respond to a request for comment.

Related: Deal reached in California port strike

The threatened strike would have involved 14,500 dock workers at all major ports along the East and Gulf Coasts, with a potential cost to the economy of at least $1 billion a day. Over half of the ocean cargo containers coming to and from the United States go through East or Gulf Coast ports, according to the Journal of Commerce.

If a strike does take place, shipping costs will rise on a wide variety of consumer goods, and tens of thousands of other workers at railroads, trucking companies and warehouses handling freight from the ports could find themselves out of work. The threatened work stoppage could also affect factories whose operations depend on items shipped through the ports like auto parts and heavy machinery.

Businesses that rely on the ports have banded together in an effort to avert the strike, calling earlier this month on the Obama administration to take action under the Taft-Hartley Act to keep workers on the job. The alliance includes umbrella groups such as the U.S. Chamber of Commerce and the National Association of Manufacturers, as well as trade groups representing retailers and makers of products including cars, chemicals, toys, food and clothing.

Matthew Shay, head of the National Retail Federation, welcomed the progress in the negotiations announced Friday, but urged the two sides to finalize a long-term agreement.

"A coast-wide port shutdown is not an option," he said in a statement.

"Our ports and the cargo and containers that flow through them are truly our economic lifelines to the world."

CNNMoney's Chris Isidore contributed reporting.