An epic overhaul of tenure may be the most important measure to come out of Trenton this year. In urban districts where up to half the kids don’t graduate high school, it’s a travesty that we haven’t done more to make sure they have decent teachers.

State Sen. Teresa Ruiz (D-Essex) hopes to fix that. And the bill she’s put forward is a great achievement. Our hope is that Gov. Chris Christie signs it — even though it has one weak spot, its protection of absolute seniority rights during times of layoffs.

Ruiz’s bill makes vital changes, though. It seeks to evaluate teachers to make sure we keep the best ones in the classroom. It gives districts the power to fire teachers who perform poorly for two consecutive years. To make that judgment, it relies on evidence of student progress. And it topples the bureaucratic hurdles that can make firing a single bad teacher a tough ordeal, one that can cost districts hundreds of thousands of dollars and take years.

Her proposal is much stronger than a competing bill from Assemblyman Patrick Diegnan (D-Middlesex), which is backed by the state’s most powerful teachers union, the New Jersey Education Association. His version waters down the emphasis on student performance, saying it can’t be a final deciding factor in a teacher’s evaluation. It gives more leeway to teachers who underperform, allowing only the very worst to be brought up on tenure charges. And it delays any reform for at least one additional year.

The big losers here would be kids stuck in classrooms with poor teachers, for whom any modicum of change will come too late.

Reforming seniority rules should be next on the agenda. They were impossible to overcome in the tenure bill, but this fight is too important to give up.

The NJEA, while backing the weaker tenure proposal, has come miles from where it was on education reform. Yet when it comes to seniority, there was no give. The union, along with most Democrats, argues that veteran teachers will be fired to save more money.

That’s highly unlikely, because it would violate federal laws against age discrimination. The real effect of these rules is districts are forced to fire good young teachers in time of layoffs. And since urban districts are losing students faster and enduring more layoffs, the seniority rules are a special burden to them.

In Newark, thanks to a shrinking student population and the rapid expansion of charter schools, Superintendent Cami Anderson will soon be forced to get rid of young teachers en masse, no matter how effective they are. Over the next year, the district is projected to lay off some 300 to 500 teachers.

The Legislature needs to find a way to avoid this carnage. A starting point would be to allow a local union to give up absolute seniority rights in contract negotiations, which is now barred by law.

We could also impose a two-year suspension of seniority rule, until Ruiz’s reform is in effect, giving districts a way to get rid of bad teachers through tenure charges. The state could also allow superintendents in failing districts to select a certain number of “all-star” teachers who are shielded from layoffs, despite lacking seniority.

We can’t allow this kind of harm to befall urban districts, where reform is needed most.

We need to bring the union on board, or take action over its objections. In the meantime, we must push forward Ruiz’s bill.