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.

President Joe Biden hailed the agreement, praising the two sides for coming together.

"Today’s tentative agreement on a record wage and an extension of the collective bargaining process represents critical progress towards a strong contract," Biden said in a statement. "I congratulate the dockworkers from the ILA, who deserve a strong contract after sacrificing so much to keep our ports open during the pandemic. And I applaud the port operators and carriers who are members of the US Maritime Alliance for working hard and putting a strong offer on the table."

"I want to thank the union workers, the carriers, and the port operators for acting patriotically to reopen our ports and ensure the availability of critical supplies for Hurricane Helene recovery and rebuilding," the president added. "Collective bargaining works, and it is critical to building a stronger economy from the middle out and the bottom up."

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 -- and just weeks before the presidential election, giving the candidates another potential issue to grapple with ahead of Nov. 5.

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.