DES MOINES, Iowa — Transgender students will not be allowed to use restrooms or locker rooms that align with their gender identity under a bill passed Thursday by Iowa lawmakers, the latest in a wave of anti-LGBTQ bills in several Republican states.

The bill prohibits people from entering a school restroom or changing room that does not align with their sex assigned on their birth certificate. The bill now heads to Gov. Kim Reynolds to be signed into law.

The House voted 57-39 to pass the bathroom bill Thursday. Five Republicans joined 34 present Democrats in opposition.

Republican supporters of the proposal say the restrictions are necessary to protect the privacy and safety of students who may feel uncomfortable sharing a facility with their transgender peers.

“This legislation is fair to everyone because it bases the use of bathrooms on what it has, up until recently, always been based upon: biology,” said Rep. Steven Holt, R-Denison. “That applies to everyone equally.”

Democrats argued that there have been no issues with transgender students in Iowa using school restrooms that align with their gender. They contend the bill could cause additional harassment of transgender kids.

“Forcing transgender students into restrooms that don’t match their gender identity puts their safety at risk,” said Minority Leader Jennifer Konfrst, D-Des Moines. “They need to be able to use the restroom that matches the gender they live every day in school, without being singled out.”

Similar proposals in recent years failed to win support at the Iowa Capitol. But Republican lawmakers this year have focused intensely on LGBTQ-related issues, introducing bills to ban gender-affirming care for transgender minors and to prohibit instruction on gender identity or sexual orientation in elementary schools.