AUSTIN, Texas – A law to require all students in Texas schools to use bathrooms that correspond to their birth gender gained approval in the state House last week and could soon become law.

State House members voted 91-50 Sunday night to require student bathrooms to be segregated by gender, with students assigned based on the gender on their birth certificate. The bathroom bill language, included as an amendment to a school emergency operations bill, stipulates that transgender students at public and charter schools would have the option of single-occupancy restrooms, as well, the Associated Press reports.

MORE NEWS: Know These Before Moving From Cyprus To The UK

“It’s absolutely about child safety,” Rep. Chris Paddie, author of the language, told the news service. “This is about accommodating all kids.”

The Texas House is expected to give the bill final approval today and send the measure to the Senate with about a week left in the legislative session. Gov. Greg Abbott has signaled he plans to sign a bathroom bill into law, according to the AP.

The school bathroom bill is the latest development in the ongoing debate over transgender students in public schools. Former President Obama last year directed schools to allow transgender students to use whatever facilities they choose and a series of legal challenges ensued. A federal court judge granted an injunction on the Obama decree, and President Trump rescinded the directive in February.

The Texas Senate considered legislation earlier in the session that would have required all public facilities in the state to segregate bathrooms by “biological sex” and forbid contradictory local laws, but that bill failed to gain traction.

The legislation approved Sunday is essentially a watered down version that applies only to public schools, the Texas Tribune reports.

Some Democratic lawmakers attempted to link the transgender bathroom issue to segregation in speaking out against the measure.

MORE NEWS: How to prepare for face-to-face classes

“White. Colored. I was living through that era … bathrooms divided us then, and it divides us now,” Rep. Senfronia Thompson said. “America has long recognized that separate but equal is not equal at all.”

A small group of Democrat women lawmakers also held an impromptu protest in the men’s bathroom at the statehouse before the Sunday debate.

Others called it a “shameful” attack on transgender people.

“Let’s be honest and clear here: This amendment is the bathroom bill, and the bathroom bill is an attack on transgender people,” said Joe Moody, a Democrat from El Paso. “Some people don’t want to admit that. Maybe that’s because they’re ashamed, but make no mistake about it – this is shameful.”

“This shameful amendment is yet another example of Texas lawmakers’ anti-LGBTQ agenda,” JoDee Winterhof, spokeswoman for the Human Rights Campaign, told the Tribune. “Transgender youth deserve the same dignity and respect as their peers, and this craven attempt to use children as a pawn for cheap political points is disturbing and unconscionable.”

The Texas Association of School Boards, meanwhile, describe the legislation as “common sense.”

“The House has approved language intended to be a common-sense solution regarding the use of restrooms and other facilities in public schools,” TASB government relations director Grover Campbell wrote in a statement.

“The language captures in law what many districts already use locally, seeking a balance between ensuring privacy and security for all students and respecting the dignity of all students.”