The House late Wednesday passed a legislative rewrite of the unpopular "No Child Left Behind" law, attracting new conservative support thanks in part to an amendment allowing parents to opt their children out of federal testing.

The Student Success Act passed narrowly, with a vote of 218-213.

The Senate is debating it's own "No Child" rewrite bill, but it is far less conservative.

The House bill aims to untether state and local school governance from federal control.

House Republican leaders were forced to pull the bill from the floor in February after conservatives threatened to sink it.

While dozens of conservatives voted against it again on Wednesday, because they believe it did not go far enough to rid federal oversight, many were willing to sign on after lawmakers 251-178 passed an amendment sponsored by Rep. Matt Salmon, R-Ariz., which would allow parents to "opt out" of federally required testing.

Republicans also worked to appease conservatives by allowing a vote on an amendment that would have allowed states to opt out of federal education programs. That amendment failed, but garnered 195 votes.

The bill includes dozens of reforms, including a provision that would allow Title I funds to be used at charter schools, which are publicly funded but privately run.

The bill also consolidates many federally funded education programs.

The Student Success Act was a top priority for House Speaker John Boehner, R-Ohio, a former chairman of the House Education Committee. He endorsed the legislation in a floor speech Wednesday night, noting that the legislation explicitly prevents the federal government from requiring states to adopt the controversial Common Core education curriculum, a program that has stirred a backlash in many communities.

"The Student Success Act replaces top-down mandates with conservative reforms that empower the parents, teachers, and administrators at the heart of our education system," Boehner said. "If we make this bill law, Washington will have fewer programs, less power, and no authority to coerce states into adopting Common Core."