In fact, Assembly members from New York City were divided. While the congestion zone was backed by some members from Manhattan and Brooklyn, others saw it as fundamentally unfair to drivers, especially in neighborhoods with few public transit options.

“Families cannot afford paying additional hundreds of dollars a month on top of the rising costs of living,” said Assemblyman William Colton, of Brooklyn. “It is unfair to subject working-class people to these costs without guaranteeing an equal value of increased benefits.”

In the end, the congestion zone became a losing battle, the latest in a long line of failed congestion pricing efforts since at least the 1970s. A decade ago, a similar congestion zone proposed by then-Mayor Michael R. Bloomberg had passed the City Council after much arm-twisting, only to die in Albany after Assembly leaders refused to bring it to a vote.

This time around, the meltdown of the city’s subway system, which was not an issue the last time, seemed to provide a stronger argument for congestion pricing. A state task force assembled by Mr. Cuomo, called Fix NYC, laid out a plan with the congestion zone as the centerpiece and included $2 to $5 surcharges on for-hire vehicles, including Ubers, Lyfts and yellow taxis.

Dozens of influential business, transportation and community groups signed on to the Fix NYC plan, expanding upon a grass-roots effort by Move NY, an early proponent of congestion pricing. The coalition spent $500,000 on a campaign, which included hiring lobbyists to press their case with legislators who were on the fence, and running targeted online ads in their districts. “It was a full-throated, well-coordinated, all-out campaign,” said Alex Matthiessen, the founder and director of Move NY.

But congestion pricing remained a hard sell, and not just to lawmakers. A Quinnipiac University poll of city voters released the day before the budget agreement found that 52 percent of respondents opposed it.

“It was an intractable issue,” said Douglas Muzzio, a public affairs professor at Baruch College, adding that congestion pricing came with too much baggage to ever really gain steam in Albany. “It was a massive effort that didn’t work — and couldn’t work — because of the unalterable opposition of legislators in the outer boroughs and suburban areas.”