NEW YORK – Unions and managers of the nation’s largest commuter railroad on Thursday reached a tentative contract agreement, averting a weekend strike that stood to inconvenience hundreds of thousands of riders.

Eight unions representing 5,400 Long Island Rail Road workers had threatened to walk off the job at 12:01 a.m. Sunday unless an agreement was reached. The workers had been seeking a new deal since 2010.

Officials said the agreement will not require an increase in fares.

The tentative deal, which still must be approved by the unions’ membership, would give employees 17 percent raises over 6½ years. For the first time, all employees would contribute to their health insurance costs, and new employees would work under different wages and pension provisions. Union negotiators had previously balked at different provisions for new workers.

Metropolitan Transportation Authority Chairman Thomas Prendergast said the deal provides a “fair and reasonable contract” that protects commuters and the fiscal health of the MTA.

Chief union negotiator Anthony Simon said his membership was reluctant to strike, but a tough stance was necessary in order to get an agreement.

“This was definitely about the riders,” Simon said. “We cared about the financial stability of the railroad as well as the members and their financial stability.”

Gov. Andrew Cuomo, who personally guided the negotiations in the closing hours, announced the deal at a news conference.

Officials in New York City and Long Island had predicted dire consequences if workers walked off the job. Approximately 300,000 riders use the railroad daily.

“All riders feel relief at the announcement of this settlement” said Mark Epstein, chairman of an advocacy group for commuters. “We are encouraged by Gov. Cuomo’s assurances on fares and the MTA’s ability to fund its capital program and look forward to reviewing additional details on the settlement and the way in which it will be funded.”

Earlier this week it appeared a strike was likely when union negotiators and MTA officials said that they had reached an impasse. Commuters fretted over contingency plans that would have had many riding school buses from LIRR stations to subway stops in New York City, or spending hours on clogged New York area roadways.

Cuomo, a Democrat who is running for re-election, jump-started the talks on Wednesday when he appealed to both sides to resume negotiating. The governor held discussions with the sides later that day and on Thursday morning summoned them to his office.

“There was a high degree of agita,” Cuomo said of the angst commuters and others shared over the prospect of a walkout. “The good news is there could have been a lot more agita next week if there had been a strike.”

The state comptroller, Thomas DiNapoli, had estimated a strike would be a “devastating blow” to a region that is still struggling to recover from Superstorm Sandy and the recession. He estimated economic losses of $50 million a day.

Eltman reported from Mineola.

Only subscribers are eligible to post comments. Please subscribe or to participate in the conversation. Here’s why.

Use the form below to reset your password. When you've submitted your account email, we will send an email with a reset code.