Major U.S. railroads and unions secured a tentative deal after 20 hours of intense talks brokered by the Biden administration to avert a rail shutdown that could have hit food and fuel supplies nationwide.

U.S. President Joe Biden announced the deal in a statement early Thursday morning, calling it "a win for tens of thousands of rail workers who worked tirelessly through the pandemic to ensure that America's families and communities got deliveries of what have kept us going during these difficult years."

The tentative deal now goes to the unions to be voted on, according to a person familiar with the negotiations.