US freight railroads and unions have reached a tentative agreement at the last minute to avert a strike that would have slammed supply chains in the country.

The National Carriers’ Conference Committee, which represents employers in collective bargaining in the sector, announced on Thursday that it reached agreements with unions Brotherhood of Railway Signalmen, SMART-TD and BLET.

“What a barn burner!” wrote Benjamin Nolan, an analyst covering rail and ocean shipping investment bank Stifel.