AUSTIN, Tex. — One of the most powerful Republican officials in Texas put the state on the front lines of the nation’s culture wars on Thursday, announcing the filing of a bill that would require people in government buildings and in public schools to use the bathroom that corresponds with their “biological sex.”

The bill, announced by Lt. Gov. Dan Patrick, is similar to one that caused a political uproar in North Carolina and led to widespread boycotts there by companies, entertainers, sports events and gay rights groups, which said the bill discriminated against transgender people who use bathrooms that correspond with their gender identity. Mr. Patrick played down the potential economic fallout for Texas and denied that the bill, which has been in the works for months, was discriminatory.

“We know it’s going to be a tough fight,” Mr. Patrick told reporters at the Texas Capitol. “The forces of fear and misinformation will pull out all the stops, both in Texas and nationally. But we know we’re on the right side of the issue, and we’re on the right side of history.”

Democratic lawmakers, civil rights groups, gay and transgender rights activists, and the state’s most influential business lobby, the Texas Association of Business, swiftly condemned the legislation and predicted an economic blow to Texas if it passed.