The Senate narrowly approved a measure Thursday to scrap Obama-era regulations outlining how states must carry out a federal law meant to hold schools accountable for student performance.

The vote was 50 to 49, mostly along party lines. Sen. Rob Portman (R-Ohio) split with the GOP to vote against the measure. The Republican-led House approved the legislation last month 240 to 181. It now goes to President Trump, who is expected to sign it.

The GOP majority argued that the rules, written by President Barack Obama’s Education Department, contradicted congressional intent and amounted to executive overreach. Democrats said repealing the rules would remove provisions meant to ensure that schools serve poor children, minorities, English-language learners and students with disabilities.

Democrats also argued that a repeal would empower Education Secretary Betsy DeVos in her advocacy for private-school vouchers. “It will give Secretary DeVos a blank check to promote her anti-public-school agenda,” said Sen. Patty Murray (Wash.), ranking Democrat on the Health, Education, Labor and Pensions Committee.

Sen. Lamar Alexander (R-Tenn.), the committee chairman, dismissed that argument. He said repealing the rules “does not in any way” give DeVos a path to creating a national voucher program, arguing that it in fact restrains her authority by asserting that the executive branch cannot stretch the law to fit its own philosophy.

The regulations were meant to give states details on how to comply with the Every Student Succeeds Act, which 85 senators voted for in 2015 as the successor to the No Child Left Behind Act. The rules clarify how states should identify struggling schools, lay out a timeline for state intervention at those schools and explain what information must be included on annual school report cards sent to parents and the public.

Without the regulations, states must rely on statutory language that in some cases is less clear or specific.

In the Senate debate, Alexander outlined 23 ways in which he said the regulations overstepped or contradicted the law.

Democrats disputed him, saying the regulations supported the balance in the bipartisan law between flexibility for states and guardrails to protect vulnerable children. Democrats — along with civil rights advocates, the American Federation of Teachers and the U.S. Chamber of Commerce — have said that nullifying the rules would open loopholes for states to shield poorly performing schools from scrutiny.

They also argue that repealing the rules would create chaos and uncertainty for states just as they are developing new plans to hold schools accountable.

Jillian Balow (R), Wyoming’s state schools superintendent, rejected that view. The federal education law is “such a robust and specific law that it doesn’t cause a great deal of consternation without rules and regulations,” she said. With or without the regulations, she added, Wyoming is “going down the same path.”

Wyoming and most other states are expected to submit their plans to the department in September. A smaller number of states are expected to submit plans April 3, just a few weeks away. The department has pledged to provide those states with further guidance by Monday on what will be expected of them.

“We can’t allow this to be a distraction,” said Chris Minnich, executive director of the Council of Chief State School Officers. “All the political back-and-forth on this isn’t helping the states. But they’re going forward and they’re producing strong plans regardless.”