It’s all over. No need to form carpool plans. The Long Island Railroad will stay on the tracks.

With the 12:01 a.m. July 21 deadline looming, the Metropolitan Transportation Authority and representatives of LIRR workers agreed on a tentative deal that will help avoid a workers strike. Both sides settled their four-year contract dispute at the Manhattan offices of New York Gov. Andrew Cuomo.

Under the terms of the agreement, existing LIRR employees will receive a 17 percent raise over six and a half years, with new employees having different wage progressions and pension plan contributions. In addition, employees will have to contribute to their health insurance costs for the first time ever. Many of these recommendations were initially made by the Presidential Emergency Board. Both sides said the new deal will not impact MTA fares and will be accommodated through revisions to the MTA’s financial plan.

Cuomo called the LIRR a critical connector of the downstate region of New York.

“Resolving this contract dispute is the right thing to do, and the agreement we have reached today is fair to all parties,” said Cuomo. “It recognizes the many contributions of the LIRR’s hardworking employees while also maintaining the fiscal integrity of the MTA.”

Anthony Simon, president of the United Transportation Union, liked the deal and praised Cuomo for intervening when both sides couldn’t reach a conclusion on their own.

“Today’s agreement provides a fair and equitable contract for our existing and future employees, and we couldn’t have gotten it done without the governor’s help,” Simon said. “Our workers move hundreds of thousands of commuters a day, and their services are integral to the New York economy.”

In 1994, Mario Cuomo, then governor of New York, intervened in a contract dispute between the MTA and LIRR during an election year and helped bridge the gap between the two parties after a two-day strike. Although Cuomo eventually lost the election to George Pataki, his son Andrew—who has a significant lead on challenger Rob Astorino in early polls—looks to fare better this election year.

“The agreement we reached today with the assistance of Governor Cuomo is just what he advocated—a fair and reasonable contract that will enable the nation’s busiest commuter railroad to continue to serve the people of Long Island,” said MTA Chairman Thomas F. Prendergast. “Both sides have compromised to reach an agreement that gives our employees the raises they deserve while also providing for the MTA’s long-term financial stability.”

New York City Public Advocate Letitia James felt happy, particularly for the residents of neighborhoods like Rosedale and parts of Queens that aren’t easily accessible by subway.

“Today, I breathe a sigh of relief for commuters in Eastern Queens, Long Island and all of us that are deeply concerned about the ramifications of a Long Island Railroad shutdown,” said James in a statement. “This agreement means that 300,000 commuters will experience a normal commute on Monday, and businesses that cater to commuters will not lose any money. I consider this a major victory for New Yorkers, particularly neighborhoods in Eastern Queens that would have experienced tremendous disruption in the instance of a strike, and I thank New York Governor Andrew Cuomo, the MTA and union leaders for paving the way for this accord.”

On to the next crisis.