Washington, DC CNN Business  — 

Unions and management reached a tentative deal early Thursday, averting a freight railroad strike that had threatened to cripple US supply chains and push prices higher for many goods.

The deal with unions representing more than 50,000 engineers and conductors was announced just after 5 a.m. ET in a statement from the White House, which called it “an important win for our economy and the American people.”

A verbal agreement between the two sides was reached at about 2:30 am ET according to sources, and the final hours were spent getting the details worked out.

That concluded about 20 hours of talks between the unions’ leadership and the railroads’ labor negotiators hosted by Labor Secretary Marty Walsh. They began their meeting Wednesday morning with the clock ticking down to a strike that had been set to start at 12:01 am ET on Friday.

President Joe Biden called in personally to talk to negotiators around 9 pm ET Wednesday, according to a person familiar with negotiations. Biden stressed that catastrophic harm could come to families, businesses and communities if the rail system shut down. Sources within the unions were giving Biden’s call credit for helping to get the deal completed without a strike.

“We’re very proud of what was accomplished,” said Jeremy Ferguson, president of the conductors union and one of the leaders involved in the marathon session. He thanked Biden and Labor Department officials involved in the talks for the deal.

“Everybody pulled together to make sure that we could get our members what they deserved,” he said.

“This is the quality of life issue we have been trying to get for our members since bargaining started,” said Dennis Pierce, president of the engineers’ union and the other union official involved in the talks.

Pierce and Ferguson met with Biden at the White House later Thursday morning. At a Rose Garden appearance, Biden thanked them, the railroads’ negotiators and administration officials who participated in the talks.

“You’ve reached an agreement that will keep our critical rail system working and avoid disruptions of our economy,” Biden said. “I’m grateful. This agreement is validation…of what I’ve always believed: Unions and management can work together…for the benefit of everyone.”

The deal needs to be ratified by union members before it can go into effect and totally end the threat of a strike. But it’s good news for a wide range of businesses that depend upon the freight railroads to continue to operate, and for the wider US economy. About 30% of the nation’s freight moves by rail.

A win for workers, railroads and the economy

The deal gives the union members an immediate 14% raise with back pay dating back to 2020, and raises totaling 24% during the five-year life of the contract, that runs from 2020 through 2024. It also gives them cash bonuses of $1,000 a year. All told, the backpay and earlier bonuses will give union members an average of an $11,000 payment per person once the deal is ratified.

Few other details of the deal have so far been made public. But the statement from Biden indicated that the major sticking point – involving work rules and scheduling issues – that had brought the country within a day of its first national rail strike in 30 years had been addressed in the unions’ favor.

“It is 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,” said Biden in a statement. “These rail workers will get better pay, improved working conditions, and peace of mind around their health care costs: all hard-earned.”

The dispute was about staffing shortages and scheduling rules that union leaders said had brought their membership to a breaking point. The unions say the railroads have been requiring their members to be “on call” and ready to report to work on short notice as often as seven days a week. Leadership of the two unions had said their members would not accept a contract without changes to those work rules.

The union said the deal provides one additional paid day off a year as well a protections against discipline if they need time off to attend to routine and preventative medical care, as well as exemptions from attendance policies for hospitalizations and surgical procedures. Railroad actions against workers who were unable to be on call or report to work due to medical issues had stoked anger among union members.

Biden described the deal as “also a victory for railway companies who will be able to retain and recruit more workers for an industry that will continue to be part of the backbone of the American economy for decades to come.”

It is an important victory for Biden, who faced nothing but bad choices if a deal had not been reached. Backing Congressional action sought by the business community to impose a contract on workers would have angered his supporters among the unions. Letting the work stoppage play out risked massive economic consequences just ahead of the midterm elections.

How we got here

Railroad workers are governed by a different labor law than most workers, one that limits their freedom to strike and allows for more governmental intervention. In July, Biden issued an order that prevented a strike at that time and created a panel, known as a Presidential Emergency Board, to try to find a solution to the dispute.

It also imposed a 60-day cooling off period during which the unions could not strike and management could not lock out workers. That cooling off period was due to end early Friday.

Biden could not have ordered the railroads to keep operating once the cooling off period ended Friday. Only Congress could have acted to get the unions back to work if a strike had begun.

With a wide range of business groups calling on Congress to act, Republicans had prepared legislation that would have given railroad management the deal they wanted. But Democrats were opposed to taking such action.

A union source said that Democrats’ refusal to side with management had been a key to the talks.

“Senate leaderership not acting gave space for these negotiations,” said the union source. He said that Walsh had “hung in” with the union during the negotiations.

“it was a slog yesterday,” he said, with lots of back and forth.

“Our people were not going to give up,” said the source. “Our people would have gone on strike” if a deal was not reached by the Friday deadline.

Rank and file ratification still needed

The agreement does not mean the threat of a strike has gone away entirely. The deal needs to be ratified by rank-and-file union members.

Some union members appeared to criticize the deal on social media, and the unions’ leadership conceded that some rank-and-file members may be unsatisfied with the deal.

“We got a little bit of paid time off, but we’ll live to fight another day. You know, that’s part of bargaining,” Michael Baldwin, president of the Brotherhood of Railroad Signalmen, told CNN. “When the members look at what is in the contract, I think they’re going to see that the wages and extra day of paid leave is going to be beneficial to them. …Sometimes you can’t accomplish everything, so you come back next time.”

Another union leader was confident the tentative deal would be accepted.

“I think we got everything we could,” Dennis Pierce, president of the Brotherhood of Locomotive Engineers and Trainmen told CNN. “And I think once our membership understands where we sit and what’s in it, I think it’ll ratify.”

Recently, the members of some unions have balked at approving deals, even when recommended by their union’s leadership.

About 10,000 members of the United Auto Workers union at farm equipment maker John Deere went on strike last fall after rejecting a lucrative tentative agreement, and then stayed on strike after rejecting a subsequent deal. They finally returned to work after five weeks.

Striking workers at cereal maker Kellogg (K) also rejected a tentative deal and decided to stay on strike in December before finally agreeing to deal weeks later. And only 50.3% of film production workers voted in favor of a deal that achieved virtually all bargaining goals of their union, averting a strike by 63,000 technicians, artisans and craftspeople which could have brought production of movies, television and streaming shows to a halt.

The Association of American Railroads also praised the deal and thanked the Biden administration, as well as the unions themselves, for their role in reaching an agreement.

The pay raises and bonuses had been recommended by a presidential panel charged with trying to find a solution to the impasse in negotiations at that time.

Those terms were lucrative enough for most of the rail unions to agree to tentative deals in recent weeks, the engineers and conductors, who were faced with work and scheduling rules that did not apply to others, refused to sign on without relief on the scheduling issue.

Shares of the major freight railroads were mixed. Union Pacific (UNP) and CSX (CSX) were a bit higher, while Norfolk Southern (NSC) shares fell. Shares of Berkshire Hathaway (BRKA), which owns the fourth national freight railroad, Burlington Northern Santa Fe, was narrowly lower.

Disruptions had already started

The threat of the strike had already started to disrupt operations. Amtrak, whose 22,000-mile system is almost exclusively over freight rail lines outside of the Northeast Corridor, had already canceled all long-distance trains. Amtrak said it “is working to quickly restore canceled trains and reaching out to impacted customers to accommodate on first available departures.” It said it will provide update soon as information becomes available.

The railroads had already stopped accepting shipments of hazardous and security-related materials a week ago. And Wednesday some of the railroads had stopped accepting shipments of crops from the agricultural industry.

Customers of the railroads who had been braced to major problems expressed relief that a strike had been avoided.

“This is fantastic news for the economy,” said Eric Hoplin, CEO of the National Association of Wholesale Distributors, in an appearance on CNN’s New Day Thursday. “My phone has been ringing off the hook over the last 48 hours, talking to distribution leaders from across the country, who were spelling out what some of the catastrophic consequences could have been to America’s supply chain and the economy.”

The US economy avoided several economic blows, including a potential spike in gasoline prices that could have undone the 26% decline in prices at the pump over the last three months. Although refineries get most of their oil through pipelines and ship out most of the gasoline they produce the same way, they still needed railroad tank cars to deliver other materials to refine gasoline and to take away waste products.

Higher prices for food and cars and a shortage of consumer goods well into the holiday shopping season were likely if there had been a prolonged strike, according to business leaders and economists.