South Dakota Governor Dennis Daugaard on Tuesday vetoed a bill that sought to prohibit students in public schools from using the bathroom that does not conform to their gender at birth.

In a press release, Daugaard, a Republican, said that the House Bill 1008 “removes the ability of local school districts to determine the most appropriate accommodations for their individual students and replaces that flexibility with a state mandate.”

He added that the proposal “invites conflict and litigation, diverting energy and resources from the education of the children of this state.”

“This law will create a certain liability for school districts and the state in an area where no such liability exists today,” Daugaard said.

Chad Griffin, president of the Human Rights Campaign (HRC), the nation's largest LGBT rights advocate, cheered the move.

“Governor Daugaard chose to do the right thing and veto this outrageous legislation attacking transgender kids,” Griffin said. “Today, the voices of fairness and equality prevailed, and these students' rights and dignity prevailed against overwhelming odds and vicious opponents in the state legislature. Unfortunately, another anti-LGBT bill is still pending in the South Dakota Legislature – and we must keep up the fight to ensure today’s veto holds and this other odious bill never makes it to Governor Daugaard’s desk.”