The 12:03 p.m. Long Island Rail Road train to Ronkonkoma departed Penn Station on Tuesday, the first train to do so since a strike suspended all service on the nation’s busiest passenger railroad 84 hours earlier.

Commuting between Long Island and New York City had remained difficult on Tuesday morning as trains and workers got back into position after transit officials and unions representing rail workers agreed to a new contract late Monday night, ending the three-day strike.

Hourly train service on the main branches of the L.I.R.R., the nation’s busiest passenger railroad, was the first to begin midday on Tuesday, with full service set to return to all lines by 4 p.m. in time for the evening rush, according to Rob Free, the president of the railroad.

Workers for the five striking unions, which represent about half the railroad’s work force, had not received a raise since 2022. They had been seeking a wage increase for 2026 in addition to three years of retroactive raises.

The Metropolitan Transportation Authority, the state transit agency that runs the railroad, had argued that the wage increases could jeopardize its negotiations with dozens of other unions and force it to raise fares or cut service.

While some details of the agreement were still unclear, the deal included what effectively amounted to a 4.5 percent wage increase in 2026, over a period slightly longer than a year, according to three people familiar with the negotiations. The unions had previously sought a 5 percent increase, while the M.T.A.’s offer was closer to 3 percent.

Gov. Kathy Hochul said the agreement would not lead to increases in fares or state taxes. At a news conference on Tuesday, Mr. Free said he would not go into the details of the deal, but he said that the 4.5 percent increase was lower than an increase that would have led to fare hikes.

“There are things in there that make it more affordable, make it more palatable for the unions to agree upon, and make it easier for us to fit within a financial structure,” he said.

Mr. Free also reaffirmed that L.I.R.R. riders with monthly passes would be reimbursed for the business days when service was suspended, pending board approval.

The strike shut down the entire service, which carries an average of more than 270,000 passengers a day between Long Island and New York City. It was the first strike on the railroad since 1994, when a similar shutdown lasted for two days.

Tuesday morning commuters had mixed views on the strike.

Paul Racz, 31, an operating engineer from Levittown who works in Manhattan’s financial district, said that as a member of a union himself, he was fine tacking the extra hours onto his commute for the sake of helping railroad union workers win a better deal.

“Good for them,” he said. “Fight for what you want.”

But Bibi Shakur, an elder care provider who commutes from Queens to Plainview Hospital on Long Island, said that while she appreciated the professionalism and courtesy of railroad workers, she didn’t think the strike had been worth it.

“We still have to go to work,” she said. “It shouldn’t have come to this.”

Here’s what to know:

Why workers were striking: The workers represented by the five striking unions sought a higher percentage-based salary increase in 2026 than the M.T.A. was willing to offer. Negotiations collapsed when the two sides could not agree on terms, like a proposal to change health care plans that could raise costs for new hires.

Hochul and Trump: The strike set off a dispute between Ms. Hochul, who oversees the M.T.A., and President Trump, whom she blamed for increasing the odds of a strike. Read more ›

Previous stoppage: This L.I.R.R. strike lasted a day longer than the last one, which took place more than 30 years ago and ended after then-Gov. Mario Cuomo largely conceded to the unions’ terms. Read more ›

Pronunciation: L-I-R-R? L-I-Double-R? Lurr? New Yorkers can’t agree on what to call the railroad. Read more ›

Grace Ashford, Nate Schweber and Miles G. Cohen contributed reporting.