WASHINGTON - After years of failed efforts, the House voted overwhelmingly Wednesday to sharply scale back the federal role in American education. But the bill would retain the testing requirement in the 2002 No Child Left Behind law that many parents, teachers, and school districts abhor.

The legislation, approved, 359-64, would return to the states decision-making power over how to use students' test performance in assessing teachers and schools. The measure would end federal efforts to encourage academic standards such as Common Core.

The 1,000-plus-page measure was a compromise reached by House and Senate negotiators. The Senate is to vote on it early next week and President Obama is expected to sign it.

Rep. John Kline (R., Minn.), who led the conference committee, said Washington had been micromanaging schools for too long.

The legislation would maintain a key feature of the Bush-era law: annual reading and math testing of children in grades 3 through 8 and once in high school. And it would require schools to make those test scores public noting students' races and whether they are disabled to help identify achievements gaps and struggling schools.

Principals, teachers, and parents have long complained on what they consider a maze of redundant, unnecessary tests and too much "teaching to the test." The legislation would encourage states to set limits on how much time kids spend taking tests and end federal efforts to tie test scores to teacher ratings.