WASHINGTON, D.C. (WFLA) — The White House announced that a ‘tentative agreement’ was reached early Thursday morning to avoid a rail strike that threatened the U.S. supply chain.

After over 20 hours of negotiations, rail companies and union negotiators came to an agreement “that balances the needs of workers, businesses, and our nation’s economy”, according to Secretary of Labor Marty Walsh. Negotiators had until 12:01 a.m. Friday to reach a deal to avoid a major blow to the nation’s economy.

In a statement Thursday, President Biden praised the Department of Labor and union negotiators for their “tireless work” in reaching the agreement. The president said the deal was a win not just for the economy, but for the “tens of thousands of rail workers who worked tirelessly through the pandemic” and “have kept us going during these difficult years”.

“These rail workers will get better pay, improved working conditions, and peace of mind around their health care costs: all hard-earned,” President Biden said.

Workers threatened the strike in response to rail carriers’ attendance policies and constant on-call schedules, which they say makes it impossible to attend doctor’s appointments and respond to family emergencies. Two of the largest railroad workers unions said they would strike if their employers would not allow them to call out of work.

Rail carriers and lawmakers began preparing contingency plans earlier this week in response to the looming strike. The railroads began cutting back on transporting hazardous materials and perishable, refrigerated products to avoid getting stuck on the lines in the middle of a shutdown.

Amtrak announced Wednesday that it was cancelling all long-distance trains to avoid disruptions in service. While company is not part of the ongoing labor negotiations, it operates on railroads owned by third-parties that face a potential shutdown.

The White House did not share any details of the tentative agreement.