The union representing 45,000 striking U.S. dockworkers at East and Gulf Coast ports has reached a deal to suspend a three-day strike until Jan. 15 to provide time to negotiate a new contract.

The union, the International Longshoremen’s Association, is to resume working immediately. Both sides also reached agreement on wages, but no details were given, according to a joint statement from the ports and union Thursday night.

The union went on strike early Tuesday after its contract expired in a dispute over pay and the automation of tasks at the ports from Maine to Texas. The strike came at the peak of the holiday shopping season at 36 ports that handle about half the cargo from ships coming into and out of the United States.

The walkout raised the risk of shortages of goods on store shelves if it lasted more than a few weeks. But most retailers had stocked up or shipped items early in anticipation of the work stoppage.

The strike came at the peak of the holiday shopping season at 36 ports that handle about half of the cargo from ships coming into and out of the United States.

It raised the risk of shortages of goods on store shelves if it lasted more than a few weeks. But most retailers had stocked up or shipped items early in anticipation of the work stoppage.