When Texas officials unveiled a bill Thursday that would require people to use some bathrooms corresponding with their genders at birth, it drew unavoidable comparisons to a similar law passed last year in North Carolina. It also raised the prospect of a new confrontation with college sports officials and professional sports leagues, which pulled several prominent competitions from North Carolina in light of its law and now could face pressure to back away from one of the country’s largest and most sports-mad states.

The North Carolina law, known as House Bill 2 or HB2, curbed anti-discrimination protections for lesbian, gay, bisexual and transgender people, leading to protests, boycotts and criticism from business interests in the state.

The Texas bill, which was revealed by Lt. Gov. Dan Patrick at a news conference on Thursday, is known as Senate Bill 6. It would require transgender people to use bathrooms in government buildings and public schools and universities based on their “biological sex,” overruling any contrary local rules. While it faces similar pushback from business groups, the bill has the support of the state’s attorney general.

North Carolina’s law had significant consequences for sports in that state. Its passage prompted the N.B.A. to withdraw this season’s All-Star Game from Charlotte; led the N.C.A.A. to move all of its playoff games in several sports — including first- and second-round games in its most prominent event, the Division I men’s basketball tournament — out of the state; and compelled the Atlantic Coast Conference to relocate several championships, including one in football.