This week, the Maine State Board of Corrections voted to spend money it didn’t have. For once, that was the right thing to do.

The board chose to approve funding for the needs of each of its 15 county jails and force the Legislature to come up with the money. Doing otherwise could have led to catastrophic budget cuts, including laying off frontline workers, closing down cell blocks and refusing to take new inmates.

This rightly puts the onus on legislators to live up to the state’s commitments and pay its share for funding the county jail system. It should also put pressure on the state to get serious about the drug treatment, community supervision and other diversion programs that would reduce incarceration and recidivism, saving money throughout the system.

The jail problems are nothing new. Back in 2007, then-Gov. Baldacci proposed a state takeover of the county jails to relieve crowding in the state’s prisons while reducing demands on local property tax payers, who fund the jails.

As proposed, the system would have centralized authority and given the Department of Corrections the ability to coordinate efforts to reduce overhead and control costs.

But the counties fought back and negotiated a compromise that kept them in the jail business, but capped their costs, leaving the state responsible for any increases over time. And they agreed to participate on the Board of Corrections, which was tasked with finding ways to manage the system and control costs.

The plan had some early success, but it has become a casualty of the state’s permanent budget crisis. The state’s assumption of new costs was supposed to create incentives to send fewer people to jail. Instead, lawmakers just passed flat-funded budgets that kept the counties on the hook.

It’s a system that’s broken, according to an expert from the federal government. Maine jails are “trying to do too much with too little,” Rod Miller of the U.S. Department of Justice reported last month. If Maine’s jails were a medical patient, Miller told the board, it would be “terminal”

The counties also bear some responsibility for current conditions. They fought the state takeover and bargained for a system that gave them the responsibility to work with each other. But that can’t happen in a system that is chronically underfunded.

The board was right to approve the budget requests and make the Legislature and governor take responsibility for the state’s commitment.

The next step should be real cooperation between the state and counties to cut the need for jail cells, not just cutting jail budgets.