Sen. Lamar Alexander (R-Tenn.) speaking during a news briefing at the U.S. Capitol last week. (Alex Wong/Getty Images)

This story has been updated.

The Senate on Tuesday defeated an amendment to the Every Child Achieves Act that would have allowed parents nationwide to opt out of federally-mandated state standardized tests without putting school districts at risk of federal sanctions.

The chamber voted 64 to 32 against the amendment, proposed by Sen. Mike Lee (R-Utah) amid a backlash against mandated standardized tests. “Parents, not politicians or bureaucrats, will have the final say over whether individual children take tests,” he said.

But Sen. Lamar Alexander (R-Tenn.) — the Republican co-sponsor of the carefully crafted bipartisan bill — spoke forcefully against the proposal, saying it would strip states of the right to decide whether to allow parents to opt out.

“I say to my Republican friends, do we only agree with local control when we agree with the local policy?” said Alexander, who has framed the bill as an effort to transfer power over education from the federal government to the states.

The vote sets up an important difference to reconcile between the House and Senate bills to rewrite No Child Left Behind, the nation’s main federal education law.

Current law requires school districts to ensure that 95 percent of children take the exams, a provision meant to ensure that administrators don’t encourage low performers to stay home on exam day. The Senate bill mandates 95 percent participation of students who are required to be tested, but allows states to decide whether children who opt out are among those who are required to be tested.

But under the House bill, parents who opt their children out of tests would not be counted in the participation rate of any state, effectively removing them from the accountability system altogether. Democrats and civil rights groups opposed that provision, saying it opened a loophole to hide achievement gaps.