The right of every child to a good education and the desire to keep teens who commit minor offenses from lives of serious crime should be shared values, not partisan bargaining chips in a brutal budget battle.

Republicans wanted increased public funding for charter schools and more of them, lifesavers for students whose traditional public schools are failing. Democrats wanted to raise the age of criminal responsibility to no longer treat 16- and 17-year-olds charged with nonviolent crimes as adults, increasing the chances these kids can get back on track and stay out of trouble — a stance echoing a national bipartisan consensus for a more humane and effective criminal justice system.

Fortunately, Gov. Andrew M. Cuomo got agreement on both issues in a $153 billion state spending plan for 2017-18 that makes other good criminal justice reforms, provides a needed boost for Long Island infrastructure and assists the middle class.

Part of that help is a plan to offer free college tuition at state schools for students whose families make up to $125,000. It rolls out over three years and will remove some barriers to higher education for more New Yorkers struggling to get ahead.

There was big money for clean water — $2.5 billion — with Long Island lawmakers playing a pivotal role in getting it. Ride-hailing companies like Uber and Lyft now can operate throughout New York under new state regulations; Nassau and Suffolk could opt out but that would be foolish, these services are needed.

Money will be set aside to ensure indigent defendants and immigrants get capable legal representation. And decades after the video-recording of police interrogations became common nationwide, New York will now require it, a protection for the police and prosecutors and the accused.

advertisement | advertise on newsday

Cutting property taxes even by a few dollars here and there is worth it, so Cuomo’s plan to induce local governments to share services should be tried. But school taxes are the killer, and shared services plans involving local districts and BOCES are optional and unlikely to happen.

There’s money for good local projects — Long Island Rail Road station improvements, a new station at Brookhaven National Lab, the Nassau Expressway reconstruction and sewers for the Kings Park and Smithtown downtowns. As for $20 million for direct access to Long Island MacArthur Airport, this is seed money for a new terminal on the north side and must be wisely used to unleash the airport’s potential.

While we applaud Cuomo’s regional approach to big infrastructure (see the Tappan Zee Bridge and LaGuardia Airport), there still is too little transparency on economic development spending and too little oversight on executive branch actions. That must change.

Missing again were significant ethics and voting reforms. They don’t need to be included in the budget discussion but often that’s the only way to get such things done. It was another missed opportunity.

All wars have casualties. But this one also produced some real wins, for Long Island and New York, no matter which political party is doing the tally. — The editorial board