MONTGOMERY, Ala. (AP) — Alabama lawmakers have advanced legislation that would ban transgender students from using school bathrooms and locker rooms that match their gender identity.

The House Education Policy Committee on Wednesday approved the bill that would require K-12 students statewide to use facilities that match the sex on their original birth certificate.

The bill now moves to the full House of Representatives.

Republican Rep. Scott Stadthagen said his bill is about protecting students and preventing sexual predators from being able to enter bathrooms.

But opponents said the proposal blatantly discriminates against transgender youth and puts them at risk, under the guise of safety. Similar policies in other states have resulted in litigation.