American railway companies and unions have reached a tentative labor agreement amid the threat of strikes.
U.S. Secretary of Labor Marty Walsh announced the news on Twitter early Thursday, "following more than 20 consecutive hours of negotiations at" his office in Washington, D.C. He said the tentative agreement "balances the needs of workers, businesses, and our nation's economy."
"The Biden Administration applauds all parties for reaching this hard-fought, mutually beneficial deal," Walsh added. "Our rail system is integral to our supply chain, and a disruption would have had catastrophic impacts on industries, travelers and families across the country."
MORE: Potential rail strike could have 'significant detrimental effects,' supply chain expert saysThe two largest rail unions -- the Brotherhood of Locomotive Engineers Trainmen, or BLET, and the SMART Transportation Division, or SMART-TD, which make up roughly half of all rail workers -- had held out in negotiations as nine other unions reached agreements with the companies by Wednesday.
BLET and SMART-TD confirmed the tentative agreement in a statement on Thursday.
"Early this morning, following nearly three years of bargaining, the [BLET] and [SMART-TD] reached a Tentative National Agreement with the nation’s largest freight rail carriers that includes wage increases, bonuses, with no increases to insurance copays and deductibles," the unions said.
The agreement improves the time-off policies at the rail companies, which made up a key sticking point in the negotiations, the unions said in the statement.
"For the first time, our unions were able to obtain negotiated contract language exempting time off for certain medical events from carrier attendance policies. Our unions will now begin the process of submitting the tentative agreement to a vote by the memberships of both unions.
President Joe Biden released a statement early Thursday, calling the tentative agreement, "an important win for our economy and the American people."
"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," Biden said. "These rail workers will get better pay, improved working conditions, and peace of mind around their health care costs: all hard-earned. The agreement is 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."
The president thanked the rail companies and unions as well as Walsh and other officials in his administration, noting that the deal will "keep our critical rail system working and avoid disruption of our economy."
"As a result, we will keep Americans on the job in all the industries in this country that are touched by this vital industry," he added. "For the American people, the hard work done to reach this tentative agreement means that our economy can avert the significant damage any shutdown would have brought."
Passenger railroad service Amtrak told ABC News in a statement Thursday, that it "is working to quickly restore canceled trains and reaching out to impacted customers to accommodate on first available departures."
MORE: Looming railroad strike could cripple US economy, transportationA potential strike could lead to $2 billion a day in lost economic output, according to the Association of American Railroads, which lobbies on behalf of railway companies. Rail is critical to the entire goods side of the economy, including agriculture, manufacturing, retail and warehousing. Freight railroads are responsible for transporting 40% of the nation's long-haul freight -- and a work stoppage could endanger those shipments.
"The artery of the U.S. economy is the rail system. It's one of the ways we get everything around. One-third of everything gets around this way. And when you cut it, you have a stroke," Diane Swonk, chief economist at global tax firm KPMG, said in an interview with ABC News.
Should a strike have happened, Americans would have felt the effects in their wallets, Swonk said.
"It means everything from the potential for layoffs -- at the same time that prices are going to continue to rise and you're going to see more empty shelves in your store," Swonk said.
Prior to Thursday's tentative agreement, unions said that workers were seeking improvements to working conditions, accusing rail companies of penalizing workers for taking time off for medical reasons. The unions also said that rail companies were jeopardizing the country's economy to force a deal.
The National Carriers' Conference Committee, which represents the U.S. freight railroads in national collective bargaining, said rail employees are provided "significant" time off and that the companies have offered a fair contract that includes a significant wage increase.
By Wednesday, nine unions had reached tentative agreements but ongoing negotiations with two holdouts into the early hours on Thursday risked a strike as early as 12:01 a.m. on Friday. That's when the the cooling-off period under the Railway Labor Act ends and strikes would become legal.
Approximately 4,900 rail workers with a third holdout union -- the International Association of Machinists and Aerospace Workers District 19 -- turned down a deal with the NCCC and will strike in two weeks should an agreement not be reached with rail companies, the union said Wednesday.
Prior to the tentative agreement, BLET and SMART-TD remained at the bargaining table early Thursday calling for better time-off policies for their workers.
The railroad companies routinely penalize workers for taking time off for sickness or a doctor's appointment, BLET and SMART-TD said in a statement on Sunday.
"No working-class American should be treated with this level of harassment in the workplace for simply becoming ill or going to a routine medical visit," the unions said.
The unions said these policies have forced "thousands of employees" out of the industry and make it "impossible" to recruit new workers.
A presidential emergency board, assembled last month by the Biden administration, had issued recommendations for a compromise between the unions and rail companies. The recommendations included a 24% raise from 2020 to 2024 and bonus increases, but they omitted the union's demand for a new time-off policy.
"Rail employees are provided with significant time off," the NCCC said on its website. "The unions proposed that the PEB recommend additional paid sick time, and the operating craft unions also proposed that the railroads' existing attendance policies be voided until new ones that must be negotiated with the unions can be reached."
"The PEB, however, recognized that the railroads' rights to unilaterally establish and modify reasonable attendance policies has been acknowledged for years," the NCCC said.
Mina Kaji, William Kim, Amanda Mail and Max Zahn contributed to this report.