The politics of rewriting No Child Left Behind, the main K-12 federal education law that seemingly everyone has grown to hate but no one has been able to fix, grew more muddled Friday.

House Speaker John A. Boehner’s decision to resign complicates the fragile effort between House and Senate negotiators, who have been working on a compromise to replace the 2002 No Child Left Behind Act.

Congress has been trying to update the law, widely recognized as broken and a burden to the nation’s 100,000 public schools, since 2007. In July, the Senate passed a bipartisan bill while House Republicans approved a GOP version — the closest they’ve ever come to a new law.

Boehner’s decision to step down came as conservative GOP members of the House Freedom Caucus were talking about holding a no-confidence vote. The caucus members opposed the House GOP bill because they don’t want any federal role in public education at all. They say they believe schools to be a strictly state and local function.

But to reach a deal with the Senate that could also win President Obama’s signature, House negotiators are going to have to compromise with Democrats, who insist the federal government must exercise some oversight of K-12 education.

If Boehner is succeeded by a speaker more closely aligned with the Freedom Caucus, the chances for a deal plummet, some observers said Friday.

“This brings passage of a bill that can get signed by Obama from ‘very likely’ to ‘somewhat doubtful,’ ” said Charles Barone, policy director at Democrats for Education Reform who helped negotiate No Child Left Behind as a Hill aide.

Bob Wise, a former congressman and West Virginia governor and now president of the Alliance for Excellent Education, an advocacy group, said the leadership shake-up will make it tough for Rep. John Kline (R-Minn.), a Boehner ally and key House negotiator on the education bill.

“With Boehner’s resignation, Kline’s ability to secure Republican votes for a bill that will have to satisfy both House Democrats and President Obama becomes slim to none,” Wise said.

But Mary Kusler, the chief lobbyist for the National Education Association, thinks there is a window of opportunity. “It’s even more important to get this done before [Boehner] leaves,” she said. “And so I think people are going to get down, get meeting and get serious about finishing this. We are so close to getting this done.”

Sen. Lamar Alexander (R-Tenn.), chairman of the Senate Health, Education, Labor and Pensions Committee, said work has progressed too far to be derailed by the House shake-up. He said he hoped to have a deal to the president by Thanksgiving.

“This is pretty far down the pike,” Alexander said Friday. “I don’t see it having much impact when members go home to their districts and they hear from governors and superintendents and teachers telling them to get this done.”

Kline, who in early September announced his own retirement after this session, said through a spokeswoman that he is determined to finish the job by sending a “bipartisan, bicameral agreement to the president.”

Boehner has a special connection to No Child Left Behind. He is the last sitting member of Congress to have helped write the law, which President George W. Bush signed in 2002.

For the first time, the federal government required states to test students in math and reading and to 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 erupted; and some states lowered standards so their students would appear more proficient.

As states clamored for relief, 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 now hold such waivers.

That led Republicans to accuse the Obama administration of acting as a “national school board.”

If a replacement for No Child Left Behind is enacted, the waivers disappear and more authority over education shifts to states and local districts.

That might give some members of the Freedom Caucus an incentive to support a compromise bill. “Once Republicans think about this, they’ll realize this is the biggest step toward local control of public schools in 25 years,” Alexander said.