Gov. Dennis Daugaard has vetoed a bill that would have required transgender students in South Dakota's public schools to use bathrooms, locker rooms and other facilities based on their gender at birth.

Daugaard issued the veto Tuesday afternoon on a bill that would have become law at midnight if he had taken no action.

Opponents of the measure, including the American Civil Liberties Union and the Human Rights Campaign, had called on Daugaard to veto the bill.

"Proponents of House Bill 1008 say it protects students' privacy," South Dakota Public Radio reports. "Opponents say it's discrimination."

After the bill was approved by a 20-15 vote in the state Senate last month, its opponents held protests and questioned lawmakers about it. Daugaard, who in the past had said that he saw the legislation as providing accommodations for both sides, had also met with transgender students and parents.

"I heard their personal stories," Daugaard said after those meetings, according to SDPB. "And so I saw things through their eyes in that sense. I had read other personal stories. Certainly I'm getting personal stories through the emails, and through what I read in the paper."

The law would have had particular impact for the 1,360 youth in South Dakota who identify as transgender, according to an estimate by the Williams Institute, a think tank based at UCLA. But it's also part of a wider debate over lesbian, gay, bisexual and transgender rights.

Last week, the city council of Charlotte, N.C., approved a nondiscrimination ordinance that allows transgender people to use the bathroom of their choice.

Copyright 2016 NPR. To see more, visit