President Biden and his Cabinet have been directly involved in trying to broker an agreement between rail companies and worker unions, seeking to avert a strike that could severely affect commuter rail services and consumer prices.

Administration officials confirmed that Biden and Labor Secretary Marty Walsh have reached out to both sides of the dispute, hoping to broker an agreement and avoid a shutdown.

A White House official said Biden was involved Monday in outreach to unions and freight rail companies and was updated again Tuesday on the situation.

A Department of Labor spokesperson said Walsh reached out Monday night “to push the parties to reach a resolution that averts any shutdown of our rail system.”

“All parties need to stay at the table, bargain in good faith to resolve outstanding issues, and come to an agreement,” the spokesperson said. “The fact that we are already seeing some impacts of contingency planning by railways again demonstrates that a shutdown of our freight rail system is an unacceptable outcome for our economy and the American people, and all parties must work to avoid that.”

The companies that operate railways for freight trains and the unions who work those rails have until Friday to agree to a new contract. Without a deal, workers could go on strike, crippling supply chains that depend on freight trains.

A strike could also impact passenger rail service. Amtrak does not own the railways where its trains operate in certain parts of the country but instead operates on railways owned by freight companies. Amtrak on Monday canceled some long-distance routes in anticipation of a potential strike.

Biden earlier this year created a Presidential Emergency Board to try and broker a compromise between the two parties, and his involvement in the latest round of talks further heightens his political risk should talks break down.

Five of the 12 unions representing rail workers have reached tentative agreements with railroads to enact the Presidential Emergency Board recommendations, which call for 24 percent pay raises, back pay and cash bonuses.

But the bulk of rail workers belong to unions that haven’t yet struck a deal with companies.

Should the workers vote to strike, Congress could intervene to halt it.