New York Gov. Andrew Cuomo (D) vetoed a bill that would have required the state to fund legal services for the poor.

Cuomo struck down the bipartisan reform in its final hour on New Year’s Eve, to the disappointment of defense attorneys and municipalities across the state.

Cuomo spokesman Richard Azzopardi said the program, which would give the state seven years to take over complete funding of indigent legal services, was just too expensive.

“Until the last possible moment, we attempted to reach an agreement with the Legislature that would have achieved the stated goal of this legislation, been fiscally responsible, and had additional safeguards to ensure accountability and transparency,” Azzopardi told the New York Daily News in a statement. “Unfortunately, an agreement was unable to be reached and the Legislature was committed to a flawed bill that placed an $800 million burden on taxpayers — $600 million of which was unnecessary — with no way to pay for it and no plan to make one.”

States are required to provide competent lawyers to those who can’t afford them. New York currently lays that responsibility on counties, which advocates say has led to a confusing assortment of programs that are underfunded and unreliable.

The bill passed unanimously in June, following a 2015 class-action suit brought by the New York Civil Liberties Union that accused the state of an unconstitutional, “poorly resourced and largely dysfunctional public defense system.” Poor New Yorkers often are forced into court dates without a lawyer, accept unfair plea deals and get slapped with harsher sentences for petty offenses, according to NYCLU Executive Director Donna Lieberman.

In vetoing the measure, Cuomo blocked new standards that would limit public defense attorneys’ caseloads and require counsel at a defendant’s first hearing, alongside more reform.

“We are deeply disappointed that the governor has vetoed the most important criminal justice reform legislation in memory,” Lieberman said in a press statement. “He has rejected a groundbreaking and bipartisan fix to our deeply flawed public defense system and left in place the status quo, in which the state violates the rights of New Yorkers every day and delivers unequal justice.”

Assembly bill sponsor Patricia Fahy (D-Albany) told the Daily News that she’ll fight again for what she calls a “constitutional mandate” in the upcoming session.