Rep. John Kline (R-Minn.), chairman of the House Education Committee, worked for years to replace No Child Left Behind, the outdated federal education law. (J. Scott Applewhite/AP)

The House of Representatives on Wednesday passed a bipartisan K-12 education bill that would significantly shift authority over the nation’s 100,000 public schools from the federal government to states and local school districts.

The bill — which passed easily by a margin of 359 to 64, with all the no votes coming from Republicans -- would replace No Child Left Behind, the 2002 law that amplified Washington’s role in local classrooms and launched a national system that held schools accountable based on student test scores.

The bill still needs the Senate’s approval, but the House vote was seen as the higher hurdle because of resistance from some conservative Republicans, who said the bill did not reduce the federal role enough. The Senate is expected to take up the measure next week, and President Obama has indicated that he will sign it into law.

“We are encouraged that the bill passed by the House today would codify the vision that we have long advocated for giving a fair shot at a great education to every child in America – regardless of zip code,” Education Secretary Arne Duncan said. “The bill that the House passed today reflects more of that vision than nearly any observer expected.”

No Child Left Behind was due for an overhaul in 2007, but Democrats and Republicans have struggled for eight years to reach consensus on an update that balances federalism with accountability.

In broad terms, Republicans were skeptical of the federal government’s ability to improve public education, while Democrats didn’t entirely trust state and local governments to do so without pressure from Washington. Each side sacrificed priorities to reach an agreement.

“Now, let me be clear: This is not a perfect bill,” said Rep. John Kline (R-Minn.), chairman of the House Committee on Education and the Workforce, who was determined to pass the legislation before he retires from Congress next year. “To make progress, you find common ground. But make no mistake: We compromised on the details, and we did not compromise our principles.”

Kline and Rep. Robert C. “Bobby” Scott, the ranking Democrat from Virginia, worked for months with Sens. Lamar Alexander (R-Tenn.) and Patty Murray (D-Wash.) to craft the deal.

It would largely dismantle the federal accountability system created 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 also would erase a second accountability system the Obama administration instituted in which Duncan granted waivers to 43 states and the District of Columbia excusing them from the demands of No Child Left Behind in exchange for adopting the administration’s preferred policies. Those waivers would be void by August under the bill.

And it would significantly reduce the legal authority of the education secretary, who would be legally barred from influencing state decisions about academic benchmarks, such as the Common Core State Standards, teacher evaluations and other education policies.

Under the proposal, 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.

It 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 two-thirds of students graduate on time.

But under the proposal, states — not the federal government — would determine which actions to take in those struggling schools, deciding how to evaluate school progress, how much weight to devote to standardized test scores and whether or how to evaluate teachers. States would set their own goals and timelines for academic progress, but their plans would require the federal Education Department’s approval.

The deal leaves in place the complex funding formulas used to determine yearly Title 1 grants, the money the federal government provides 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 another school. The deal also does not allow federal dollars to be used as vouchers for private school tuition.

The bill would create a $250 million annual competitive grant program to help states plan, organize and expand preschool programs for low-income children. The grant program was a priority for Murray, a former preschool teacher, as well as the Obama administration.

A broad range of national groups endorsed the bill, including the National Governors Association, the two major teachers unions, Teach for America, the U.S. Chamber of Commerce, state education leaders, the National PTA and a coalition of more than 100 civil rights groups.