The measure in Texas is broader than a law passed last year in North Carolina , which was the subject of lawsuits and state boycotts. While the North Carolina law applied to facilities run by the state government — and was partially blocked by a court — the measure in Texas would also encompass bathrooms run by local governments and public schools. The Texas bill, in addition, would stymie some local protections for transgender people.

Senate Bill 6 is the latest lightning rod in a national conflict over gender norms, the legal rights of transgender people, and the swift backlash states can face when they target LGBT rights.

In a 21 to 10 vote, the full Senate teed up the measure for a final — essentially pro forma — vote on Wednesday that would send it to the state house of representatives.

The Texas state senate took a key vote on Tuesday to advance a bill that would restrict access to restrooms, part of a Republican-led effort to enact the country’s most sweeping rules to block transgender people from facilities that match their gender identity.

Battle lines on the Senate floor Tuesday were largely partisan, with Republicans raising a specter of transgender rights giving rise to violence.

Sen. Bob Hall, of Dallas, offered a well-worn argument that failing to block transgender people from certain restrooms that match their gender identity would let men who are not transgender prey inside women's restrooms.

“We will be creating crime-free zones for them to conduct their perversion,” the Republican claimed, adding that inaction would let men “do bad things and get away with it.”

But Sen. Chuy Hinojosa of Corpus Christi, a Democrat, shot back that conduct is and would remain illegal, noting that laws against public lewdness and assault would continue to ban nefarious activities in bathrooms.

Another Democrat, Sen. Sylvia Garcia, further worried that the stigma of sending transgender students to restrooms that conflict with their gender identity could exacerbate their higher suicide rate.

Sponsored by Republican Sen. Lois Kolkhorst, Senate Bill 6 would mandate that single-sex facilities only be used by those with with a corresponding sex marker on their birth certificate. It would apply in facilities run by the state and its local government subdivisions.

When she announced the bill in January, Kolkhorst described how the rules would apply in public schools. “Are we going to have bathroom police?” she said to a question about how the rules could be enforced. “No.” Violations could be reported to local authorities, she said, and local school boards that fail to comply would face a civil penalty.

Local jurisdictions would also be blocked from enacting or enforcing their own nondiscrimination rules that let people use public facilities in accordance with their gender identity. That rule would apparently affect several Texas cities, including Austin and Dallas, which have LGBT nondiscrimination ordinances on the books.

A Senate report last week said the bill may have economic repercussions, noting, "According to the City of Houston, the bill would have a significant impact if corporations and special events choose not to pursue certain business in the state; the city anticipates the impact could be in the millions of dollars."

Republicans, however, shot down amendments that would gauge financial costs of the bill.

“It is nothing more than a discriminatory bill that would negatively impact the economy," Democratic Sen. Borris Miles of Houston said on the Senate floor. He argued Texas risks the same sort of corporate, sporting event, and travel boycotts that have dogged North Carolina.

Assuming the measure advances out of the Texas Senate on a final vote, it will go to the state House, where it may face stiffer opposition. House Speaker Joe Straus told reporters last week, “I’m not a fan of the bill.”