Senate Health, Education, Labor and Pensions Committee Chairman Lamar Alexander, right, and Sen. Patty Murray, left, helped negotiate a compromise to replace No Child Left Behind law. (Susan Walsh/AP)

Congressional negotiators have struck a tentative deal to replace No Child Left Behind, the main federal K-12 education law, by shifting authority for schools to states and freeing them from many federal demands that have been in place for 13 years.

The deal largely follows the contours of a measure passed by the Senate with strong bipartisan support in July, according to several sources briefed on the agreement who asked for anonymity because they were not authorized to discuss closed-door negotiations.

And it plucked a few ideas from a bill passed by House Republicans in July, including the elimination of some programs that were deemed ineffective by the federal government or had never been funded.

The agreement maintains the federal requirement 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.

It also requires states to 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.

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

For schools that are not struggling, states would decide how to measure their progress, how much weight to give to their standardized test scores, and whether to use test scores to evaluate teachers.

The negotiators — staff members for House and Senate committee chairmen and ranking members — say the deal straddles the differences between Republicans, who want to dramatically reduce the federal role in education, and Democrats and the Obama administration, who say the federal government has a duty to make sure states educate all children, especially those who have been historically underserved.

The deal would significantly reduce the U.S. Department of Education’s authority, prohibiting the secretary from influencing state academic standards and assessments, requiring teacher evaluations or using grant programs to influence state education policy.

Education Secretary Arne Duncan offered qualified support of the tentative deal.

“It is good news for our nation’s schools that Congress is taking the next step forward toward a serious bipartisan plan to revamp the outdated No Child Left Behind law,” Duncan said in a statement.

It includes a provision championed by Sen. Patty Murray (Wash.), ranking Democrat of the Senate Health, Education, Labor and Pensions Committee, to create competitive grants to help states create early-childhood programs, which would be run by the Department of Health and Human Services. Sen. Lamar Alexander (R-Tenn.), chairman of the Senate education panel and a former education secretary, has been opposed to expanding the portfolio of the education agency.

The agreement leaves intact the current formula for the way the federal government distributes about $14 billion annually to help educate low-income students. The program, known as Title 1, follows a complex set of formulas that favors states with large populations and wealthy states that spend a lot on education. Rural states, and states with smaller populations, tend to receive less on a per-pupil basis, and lawmakers from those states sought to change the formula to receive a greater share.

The deal next goes to a conference committee of lawmakers from both chambers who aim to bring it to the House and Senate for a vote after Thanksgiving.

Passage would be significant, as Congress has been trying to rewrite the law for eight years.

When it was signed by President George W. Bush in 2002, No Child Left Behind ushered in an era of test-based accountability for the nation’s public schools. The federal government required states to test students in math and reading and make steady academic progress until every student in the country was “proficient” by 2014, or face increasingly severe penalties.

Those goals were later seen as unrealistic, and the law had unintended consequences. Many schools squeezed out art, science and other subjects to focus on math and reading, cheating scandals emerged, and some states lowered standards so their students would appear more proficient.

But defenders of the law say it shook up complacent schools and led to slow-but-steady improvement on national math and reading test scores between 2003 and 2013. In the most recent results from 2015, scores flatlined or dipped slightly.

As states have clamored for relief from No Child Left Behind, the Obama administration in 2011 began issuing temporary waivers to excuse them from the most onerous aspects of the law as long as they adopted education policies favored by the White House. More than 40 states hold such waivers.

That led Republicans to accuse the Obama administration of acting as a “national school board.” If No Child Left Behind is replaced by a new law, the waivers will disappear.