South Dakota would be the first state in the U.S. to approve a law requiring transgender students to use bathrooms and locker rooms that correspond to their sex at birth if the governor signs a bill passed Tuesday by the state Senate.

The Senate voted 20-15 to send the bill to Republican Gov. Dennis Daugaard, who initially responded positively to the measure but said last week he'd need to study it more before making a decision.

Advocates say the bill is meant to protect the privacy of students, but opponents say it discriminates against vulnerable adolescents.

Under the plan, schools would have to provide a "reasonable accommodation" for transgender students, such as a single-occupancy bathroom or the "controlled use" of a staff-designated restroom, locker room or shower room.

Republican Sen. David Omdahl urged other legislators Tuesday to support the bill to "preserve the innocence of our young people."

Democratic lawmakers and some Republicans unsuccessfully opposed the measure in the Senate.

The American Civil Liberties Union of South Dakota and Human Rights Campaign have been vocal in their opposition to the measure and have called on Daugaard to veto the legislation.

"History has never looked kindly upon those who attack the basic civil rights of their fellow Americans, and history will not treat kindly those who support this discriminatory measure," Chad Griffin, the president of the LGBT-rights organization Human Rights Campaign, said in a statement Tuesday.

Transgender advocates have also criticized comments made by some lawmakers, including Omdahl, about transgender people.

"I'm sorry if you're so twisted you don't know who you are," Omdahl said at a recent event when asked about the bill. "I'm telling you right now, it's about protecting the kids, and I don't even understand where our society is these days."

Several states have looked at addressing gender and public facilities in the past several years. But South Dakota would be the first state in the nation to put such a measure into law, said Joellen Kralik, a research analyst at the National Conference of State Legislatures.

The Legislature's passage of the bill is "shocking," said Thomas Lewis, a transgender student in his senior year at Lincoln High School in Sioux Falls, the state's most populous city.

"At this point, I'm hoping that the governor has a sense of humanity and the common sense not to write this bill into law," said Lewis, who is planning to attend college in Minnesota. "I am so glad to be leaving soon. I can escape the oppression that my home state wants to put on me."

Supporters say South Dakota's plan is a response to changes in the Obama administration's interpretation of the federal Title IX anti-discrimination law related to education. Federal officials have said that barring students from restrooms that match their gender identity is prohibited under Title IX.