AUSTIN, Texas — A transgender “bathroom bill” reminiscent of one in North Carolina that caused a national uproar now appears to be on a fast-track to becoming law in Texas — though it may only apply to public schools.

A broader proposal mandating that virtually all transgender people in the country’s second-largest state use public restrooms according to the gender on their birth certificates sailed through the Texas Senate months ago. A similar measure had stalled in the House, but supporters late Sunday night used an amendment to tack school bathroom limits onto a separate and otherwise unrelated bill covering campus emergency operation plans.

Republican Rep. Chris Paddie authored the hotly-debated language, saying it had “absolutely no intent” to discriminate. Under it, transgender students would not be permitted to use their chosen bathroom but could be directed to separate, single-occupancy restrooms.

“it’s absolutely about child safety,” said Paddie, from the East Texas town of Marshall. “This is about accommodating all kids.”

His change passed 91-50. Final House approval should come Monday, sending the modified bill to the Senate, which should easily support it. Texas’ legislative session ends May 29, but that’s plenty of time to approve transgender bathroom legislation— even if it’s scaled-back enough to only affect the state’s roughly 5.3 million public school students, and not the general public.

“This amendment is the bathroom bill and the bathroom bill is an attack on transgender people,” said Rep. Joe Moody, an El Paso Democrat. “Some people don’t want to admit that because they are ashamed, and this is shameful.”

READ NEXT: What the North Carolina legislation to repeal the HB2 ‘bathroom bill’ actually says

A small group of Democratic women legislators went into the men’s restroom just off the House floor before debate began in protest. With Republicans enjoying solid majorities in both of Texas’ legislative chambers, though, such opposition was purely symbolic.

Houston Democratic Rep. Senfronia Thompson, one of the House’s longest-serving and most-respected members, likened the new language to when restrooms nationwide were segregated by race.

“Bathrooms divided us then and bathrooms divide us now. Separate but equal is not equal at all,” Thompson said, drawing floor applause.

While Barack Obama was still president, the U.S. Department of Education tried to implement requirements that school districts nationwide allow transgender students to choose campus bathrooms or locker rooms they wished to use. Texas led a lawsuit challenging that directive and a federal judge in Texas ordered it suspended. President Donald Trump then rescinded the order in February.

Republican Gov. Greg Abbott has said he wants to sign a bathroom bill into law. House Speaker Joe Straus, a Republican from San Antonio, has been even more vocal opposing one — saying it could hurt a Texas economy that has been among the country’s strongest in recent years.

Top firms, chambers of commerce and lobbyists also have decried the bathroom bill in all forms as bad for business. Many Hollywood actors and music stars have suggested state boycotts, and the NFL and NBA have hinted at canceling future Texas events if it passes — even though Houston successfully hosted this year’s Super Bowl.

Limiting the scope to schools could soften the kinds of costly boycotts that hit North Carolina after it approved its bathroom bill last year. The NCAA pulled sporting events and the state faced losing billions of dollars in related economic fallout, though some opposition has quieted since North Carolina lawmakers voted in March for a partial repeal.

Opponents vowed to fight Sunday’s Texas amendment with lawsuits.

If the Legislature succeeds “in forcing discrimination into Texas law, you can bet that Lambda Legal will be on the case before the next school bell rings,” Jennifer C. Pizer, senior counsel and director of law and policy at the national gay rights group Lambda Legal, said in a statement.