After years of delays, Congress has come closer than ever to rewriting the much-criticized No Child Left Behind (NCLB) federal education law. Last week, the Senate approved a bill that shares some common goals with the House measure.

While differences remain, it’s encouraging that the bills are similar in several areas because of relatively rare across-the-aisle cooperation.

For example, Democratic Rep. Keith Ellison and Republican Rep. John Kline (usually polar opposites on policy) agreed on several provisions. And observers on the left and right applauded the Senate legislation’s co-authors — Lamar Alexander, a Republican, and Patty Murray, a Democrat — for guiding the measure through the Senate and fending off amendments that could have killed it.

Minnesota Democratic Sens. Amy Klobuchar and Al Franken authored important provisions that made it into the bill, including expanding STEM (science, technology, engineering and math) opportunities, improving teacher and principal retention and training, and expanding access to mental health services for students.

Following years of complaints about punitive, sometimes unrealistic NCLB provisions, both the House and Senate bills would wisely dial back some federal involvement. Both would maintain the federally required annual tests in reading and math in grades 3 through 8 and once in high school, as well as science tests given three times between grades 3 and 12.

However, the new law — the Every Child Achieves Act — would leave it up to the states to determine how to use those tests. Instead of federally prescribed improvement plans, state-level officials would decide how to evaluate student academic performance, how to define a struggling school and how to hold educators accountable.

The bills also say the federal Department of Education could not mandate or give states incentives to adopt or maintain any particular set of standards as was done in the Race to the Top grants program. In addition, a majority of states, including Minnesota, have NCLB waivers, so officially eliminating some of those requirements may not necessarily change current practices.

While the legislation is promising, reaching an agreement on a final bill that President Obama would sign is not a done deal, because key differences remain. The House measure, for example, includes a “portability’’ provision that would allow federal money to follow low-income children to public schools of their choice. Under existing law, the dollars remain at the struggling schools. Many Democrats oppose the portability option, and the Senate bill does not include it.

Despite the differences, optimism about the adopted Senate and House bills is merited — especially after so many years of stalemates. Congress was supposed to reauthorize the original NCLB law — the Elementary and Secondary Education Act — back in 2007. Yet despite nearly universal public backlash and calls for change, NCLB remained in place.

The bills now working their way through Congress are rare examples of successful bipartisanship in an often polarized, gridlock-ridden Congress. Hopefully, that spirit of cooperation will continue through the conference-committee process and result in improved federal education policy.