Sen. Lamar Alexander (R-Tenn.), left, and Rep. John Kline (R-Minn.) talk on Capitol Hill in Washington. (Jacquelyn Martin/AP)

A conference committee of Democratic and Republican lawmakers from the House and Senate worked out their differences Thursday and overwhelmingly endorsed legislation to replace No Child Behind, the main federal education law.

The law was due for a rewrite eight years ago and is widely seen as broken, but lawmakers had been unable to come to consensus on a replacement until now.

“The real winners today are 100,000 public schools attended by 50 million children where 3.5 million teachers work,” said Sen. Lamar Alexander (R-Tenn.), chairman of the Senate Committee on Health, Education, Labor and Pensions. “In fixing this law, we know that there were alligators lurking in every corner of the pond and the fact that we were able both in the Senate and the House to navigate that pond and deal with respect for one another . . . [is a] credit to the process.”

The conference committee, comprised of Democrats and Republicans from both houses, voted 39 to 1 to endorse the deal. The sole opponent was Sen. Rand Paul (R-Ky.), who was not present and cast his no vote by proxy. Paul, who is seeking the Republican nomination for president, has railed against any involvement by the federal government in public schools.

The final agreement approved Thursday will be brought to the House for a vote by Dec. 2, said Rep. John Kline (R-Minn.), chair of the House Committee on Education and the Workforce, before it goes to the Senate. If it passes, President Obama is expected to sign the measure, which would mark a major transfer of power and authority over public schools from the federal government to states and local school districts.

It would also mean a significant reduction in the legal authority of the U.S. education secretary.

The deal would largely dismantle the federal accountability system created in 2002 by No Child Left Behind, which required schools to demonstrate academic progress as measured by standardized test scores or face a series of escalating penalties. It would also extinguish the system of waivers given by the Obama administration, in which states that wanted to escape the demands of No Child Left Behind agreed to embrace the preferred policies of the administration.

The structure was “based on good intentions but a flawed premise that Washington should decide what students learn in schools,” said Kline, who has been determined to push through a replacement for No Child Left Behind before his planned retirement from Congress next year.

While the GOP leadership in the House has indicated support for the legislation, it is likely to face some opposition from some Republican lawmakers opposed to any federal role in education.

Under the deal endorsed Thursday, the federal government would still require that states test students annually in math and reading in grades 3 through 8 and once in high school, and publicly report the scores according to race, income, ethnicity, disability and whether students are English-language learners.

The agreement also creates competitive grants to help states plan, organize and expand preschool programs for low-income children. The grant program was a priority for Sen. Patty Murray (D-Wash.), the ranking member of the Senate education panel and a former preschool teacher.

And it also would require states to intervene with “evidence-based” programs 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.

But under the proposal, states, not the federal government, would determine which actions to take in those struggling schools, and states would set goals and timelines for academic progress. Their plans would have to be approved by the U.S. Department of Education.

States would design their own accountability systems, deciding for themselves how to evaluate school progress, how much weight to devote to standardized test scores, and whether or how to evaluate teachers.

The U.S. secretary of education would be legally barred from influencing state decisions about academic standards, teacher evaluations and other education policies.

The deal leaves in place the complicated funding formulas used to determine Title 1 grants, the money sent by the federal government each year to help educate students in high poverty schools. It does not allow Title 1 funds to “follow the student” when a low-income student transfers to a different school. The deal also does not allow federal dollars to be used as vouchers for private school tuition.

And, in a nod to a vigorous national debate about overtesting, the deal includes an amendment from Sen. Michael Bennet (D-Colo.) to allow states to set a cap on the time or number of standardized tests they give each year. Nothing in federal law currently prevents such a cap, but Bennet felt it was important for the Congress to “send a message” to states to think about ways to reduce overtesting, an aide said.