Sens. Patty Murray (D-Wash.) and Lamar Alexander (R-Tenn.) worked to reach a compromise on replacing No Child Left Behind. (Susan Walsh/Associated Press)

THE BIPARTISAN bill crafted by House and Senate lawmakers to replace No Child Left Behind leaves it to the states to decide what to do about failing schools. The argument for shifting authority from the federal government is that the states are better positioned to take action and have the most at stake. That would be more persuasive if not for the fact that before the strict accountability of No Child Left Behind, states generally did little to nothing to fix schools that badly served poor and minority children.

Let’s hope supporters of the new legislation, which won passage in the House on Wednesday, are right that new safeguards will prevent a repeat of those dismal years when students who could afford it least paid the price for weak education policies.

The Every Student Succeeds Act that emerged from conference between the two chambers is likely to win Senate approval and be signed into law by President Obama. A rewrite of No Child Left Behind — a landmark achievement of Republican President George W. Bush — was long overdue, and there is a lot to admire in the new bill and in how Democrats and Republicans collaborated — notably Sens. Lamar Alexander (R-Tenn.) and Patty Murray (D-Wash.), the leaders of the Senate Health, Education, Labor and Pensions Committee.

Key elements of NCLB — annual testing of students and the requirement to make public test scores broken down by students’ race, income and other categories — were retained. Harmful proposals, including diversion of federal monies from high-poverty schools and allowing parents to opt their children out of tests, were beaten back. States would be given new incentives to expand preschool programs and create high-quality charter schools.

Most impressive is a new requirement that states intervene in schools where student test scores are in the lowest 5 percent, where achievement gaps are greatest and in high schools where fewer than 67 percent of students graduate on time. States would have to use “evidence-based” programs signed off on by the Education Department, but state authorities would have broad authority in determining goals, actions and timelines. Therein lies the risk of needed reforms falling victim to local politics, inertia and the vested interests of teachers unions, school bureaucracies and others. One of the more discouraging aspects of the congressional deliberations, for example, was the lack of appetite on either side of the aisle for vigorous teacher evaluations that take into account student achievement.

If, as expected, Congress approves this rewrite of the country’s federal K-12 education law, it will be in some measure due to widespread weariness with No Child Left Behind. What must not be forgotten is that, for all its shortcomings, NCLB succeeded in shining a much-needed spotlight on the needs of at-risk and disadvantaged students and, as a result, there was improvement. States and localities that said they needed more flexibility to do a better job in fixing schools must not lose sight of that important mission.