AUSTIN — By the time the Gonzales family stood to speak early Thursday morning, their young daughter had fallen asleep. Slung over her father's back, Libby fidgeted and, at one point, yawned, as her parents pleaded with House lawmakers to defend her rights as a transgender girl and a Texan.

"Many, many families in Texas, including my own, are counting on you to keep our children safe," Libby's mother, Rachel Gonzales, told the House Committee on State Affairs just before 2 a.m. "Please do not let us down."

Libby, 7, had wanted to speak. But she had nodded off, so her parents pleaded on her behalf. House Bill 2899, the so-called bathroom bill being debated that night, would put Libby in danger, her mother said: "It's scary enough as a parent to know you won't always be able to protect your children from the ugly in this world."

Frank Gonzales is now speaking against bathroom bill for his daughter Libby, who is transgender...& asleep RN #txlege pic.twitter.com/F9F9vlP4fr — Lauren McGaughy (@lmcgaughy) April 20, 2017

The Gonzales family represented a few of the dozens of people from across Texas who turned out for a late-night debate on the bathroom bill. By midnight, when debate on the bill kicked off, nearly 400 people had signed up to support or reject the bill; 369 were opposed.

House Bill 2899 would do away with city ordinances and school district rules that allow transgender people to use the restrooms that match their gender identity. It would not bar cities from passing laws that prohibit certain people from using certain restrooms, changing rooms and locker rooms and would also strip rights from groups such as veterans, the elderly and pregnant women.

The committee did not vote on the bill Thursday but heard testimony from any members of the public who wanted to speak. By 2 a.m., committee Chair Byron Cook, R-Corsicana, said there were still more than 100 people signed up to speak; debate didn't conclude until around 5 a.m.

"The residents and businesses of Dallas believe discrimination in all forms have no home in our community," Dallas City Council member Lee Kleinman told the lawmakers on behalf of the entire council. "Please do not perpetuate this discrimination."

Visit Dallas CEO Phillip Jones also opposed the bill and gave the committee four recommendations to improve the legislation: Let cities keep their nondiscrimination laws; let cities pass new nondiscrimination laws through voter referendums; limit the bill to only school districts and government buildings; and exempt public buildings leased by private entities, such as stadiums and convention centers.

Jones said 24 conventions and events representing $150 million in economic impact for Dallas had threatened "in writing" to pull out if a bill like this one was passed: "I'm not sure why we're passing legislation that could cause such economic harm to our state."

Kleinman said city officials disagreed with the carve-outs offered by Jones, saying they were for "equal protection under the law for all residents, no exceptions."

During the late-night debate, Cook expressed concern over transgender students like Libby using the bathrooms that match their gender identity but also said he didn't see any evidence that transgender adults were a threat in public restrooms. He questioned one man speaking in favor of the bill about what facilities a transgender person who looks and dresses like a woman should use.

"Where should they go to the bathroom?" Cook asked. "If they go into the men's room in a dress, there's going to be a riot in there."

"I'm trying to understand how that's better safety. I'm just scratching my head about how anyone is safer."

Pastor David Welch, head of the Texas Pastors Council, was one of the few who spoke for the bill, saying it was "problematic" for each city to have different ordinances on the books.

"The definition of gender identity ... simply varies from city to city," said Welch. "We believe in equal protection, but this is creating unequal protections."

When Cook pushed back, asking for evidence that transgender people were assaulting people in restrooms, Welch said, "We're not saying the transgender community is part of that."

"I don't think there's a historical problem," Cook replied. "I haven't seen it, and I've been on this committee a long time, and I've never seen that community present any problems."

The Senate passed its version of the bathroom bill last month. Senate Bill 6 differs greatly from the House bill in that it would require people to use the bathrooms in public schools, universities and government buildings based on the "biological sex" on their birth certificates.

That bill has stalled in the House, where Speaker Joe Straus has questioned the need for bathroom legislation. Before Cook scheduled the hearing on House Bill 2899, he, too, questioned the need for legislation. But this week he called the House measure "balanced," one that hopefully the business community would get behind.

It hasn't, opposing both the House and Senate bills vigorously. But Cook blasted representatives from organizations such as the Texas Association of Business, saying big corporations like American Airlines, Google and Whole Foods Market should have showed up at Thursday's hearing.

"They should be here testifying and they're not," said Cook. "I find that very unfortunate, because they have a real stake in this."

Rep. Ron Simmons, R-Carrollton, is the House bill's sponsor. Presenting his bill for the committee at the start of the late-night hearing, Simmons said he simply wanted to make local ordinances uniform.

"This issue needs to be the same in Austin as it in in Abilene," he said. "The same in Houston as it is in Hutto."

For the first time on Tuesday, Gov. Greg Abbott threw his support behind the idea of passing a bathroom bill. He called the House proposal "thoughtful" and indicated he would work with Republicans to craft legislation that would become law. His support makes it much more likely Texas will become the second state in the nation, after North Carolina, to pass a bathroom bill.