The "container cliff" has been averted.

On Friday, the East Coast dock workers' union reached a tentative agreement with shippers and port operators, a top federal mediator said. The breakthrough in talks means that the country won't have to sit through a strike by 14,500 dock workers at ports from Houston to Boston next week — a move that could have proved quite disruptive to the U.S. economy.

For months, the International Longshoremen's Association and the U.S. Maritime Alliance have been battling over the issue of "container royalties," a fee paid by shipping companies that is used to augment worker wages and benefits. That key issue now appears to be resolved in principle.

The union and the shipping companies will extend the deadline for a new contract until Feb. 6 while they hash out remaining issues. The federal mediator said he was "cautiously optimistic" that the two sides could reach a final agreement in the next 30 days.

Throughout the negotiations, the longshoremen have been trying to protect jobs that are increasingly endangered by automation. (The number of dock workers at the Port of New York and New Jersey, for instance, has dropped from 35,000 to 3,500 in the last half century.) On the other side, the U.S. Maritime Alliance, which represents 14 ports and 24 ocean carriers, has been targeting what it says are antiquated work rules.

That included the rules around "container royalties," tariffs on containerized cargo that totaled $232 million last year. Those royalties provided an average bonus to Gulf Coast and East Coast longshoremen of $15,500. Earlier, the alliance had said it wanted to freeze royalties at current levels, arguing that the longshoremen are already well compensated earning $124,000 a year on average. The dockworkers had rejected that proposal.

Neither side would comment on how the stalemate was finally resolved, and the details have yet to be released. But George Cohen, the director of the Federal Mediation and Conciliation Service, said that the breakthrough represented real progress.

"What I can report is that the agreement on this important subject represents a major positive step toward achieving an overall collective bargaining agreement," Cohen said in a statement.

Had the two sides failed to reach an agreement by midnight on Saturday, the dock workers were preparing to stop the flow of containerized cargo at 14 eastern and gulf ports, which would have slowed shipments of household goods, frozen foods, and clothing, among other things. The ports affected would have included Boston; New York-New Jersey; Charleston, S.C.; Savannah, Ga.; Miami; and Hampton Roads, Va.

A coastwide work stoppage could have put President Obama in a political bind — business groups were pressuring him to use emergency powers to halt the strike, warning that a port shutdown could ravage the still-fragile U.S. economy. Such a move would have been extremely unpopular with labor groups.

Businesses were, however, cautiously optimistic about Friday's announcement. “Retailers welcome news that the ports will remain open for business through the busy spring shipping season," said Kelly Kolb, vice president for government affairs at the Retail Leaders Industry Association in a statement. But Kolb urged the longshoremen and shippers to reach a long-term deal in the next 30 days.

And if a long-term deal does get inked, the White House can turn its full attention back to all the other looming cliffs now facing the country.