The Texas House gave preliminary approval Tuesday to a bill that would keep the agency that oversees the state’s oil and gas industry functioning until 2029 — but only after members dragged controversial topics like immigration and bathroom restrictions for transgender people into what should have been a routine debate.

House Bill 1818 by state Rep. Larry Gonzales, R-Round Rock, would keep the Texas Railroad Commission's name — instead of the re-naming it the Oil and Gas Commission — while giving the agency more oversight of pipeline construction in Texas.

After three hours of clashing over immigration and bathrooms, House members sent the bill to its final step – a procedural third-reading vote Wednesday – with a voice vote.

State Rep. Rafael Anchia, D-Dallas, the chairman of the Mexican American Legislative Caucus, said he wanted to make a point by offering amendments that would have held the CEOs of businesses that contract with the Railroad Commission subject to a perjury charge if they were caught hiring unauthorized workers.

The Texas Tribune thanks its sponsors. Become one.

Anchia said Tuesday he wanted highlight what he said was the hypocrisy of the state legislature for demonizing undocumented immigrants but not calling out the businesses that hire them.

After the members unanimously voted down that amendment, things took a surprising turn when Rep. Greg Bonnen, R-Friendswood, tacked his own amendment onto a separate Anchia amendment that also targeted companies that hired undocumented workers. Bonnen's amendment would require that companies that do business with the Railroad commission use the federal electronic employment verification system known as E-Verify.

With that change, the Anchia amendment was adopted — even though most Democrats, including Anchia, voted against it because of the newly-attached E-Verify provision.

Anchia said afterward that he didn’t outsmart himself, though he was surprised that Republicans actually approved of tacking on the E-Verify amendment.

“I think it’s very interesting that Republicans stepped up to the plate and now imposed E-Verify on the oil and gas industry," he said. "This is going to be a substantial hit to the industry.”

Asked later what he would say to a laborer who loses his job if his amendment becomes law, Anchia said: “I’d say I’m sorry. It’s a very difficult situation, but employers need to be called to account.”

The Texas Tribune thanks its sponsors. Become one.

With that issue settled, House members then braced for a fight over which bathroom transgender Texans can use. 

In a face-off with some of the most conservative members of the House, Speaker Joe Straus prevented three bathroom-related amendments from being considered by the full chamber — spiking efforts to force House members to vote on the regulations proposed in the Senate’s controversial “bathroom bill.”

Straus determined that amendments filed by state Reps. Matt Schaefer of Tyler and Tony Tinderholt of Arlington weren't relevant to the bill.

Schaefer's two amendments would have essentially required the Railroad Commission to enact some of the bathroom restrictions in Senate Bill 6, such as limiting bathroom use on the basis of “biological sex” and preventing most transgender individuals from using bathrooms that match with their gender identity.

Tinderholt’s amendment targeted transgender people by requiring the agency to define female business owners — who can qualify for certain contracting benefits — on the basis of the “physical condition of being female, as stated on a person’s birth certificate.”

When Straus ruled his amendment wasn't relevant to the bill, Schaefer questioned: “Is there a standard that we could understand to know when the chair is going to allow a member to lay an amendment out and when they’re not?”

“When they’re not crazy!” another member yelled from the back of the chamber.

The Texas Tribune thanks its sponsors. Become one.

Schaefer and Tinderholt are among the socially conservative members who have organized as the Texas Freedom Caucus, which is expected to repeatedly offer portions of the “bathroom bill” as amendments to other measures in the House, where Senate Bill 6 is unlikely to gain much traction.

Straus has said he opposes the legislation, calling it “manufactured and unnecessary.”

After the vote, Schaefer told reporters he was concerned Senate Bill 6 won't get a vote in the House, “But I can assure you that if it happens, there’s a lot more support on this floor than people realize and I think there’s a lot of efforts going on behind the scenes to continue to push to bring this for the floor.”

Despite all the attention given to the amendments, Gonzales said he was proud of the final bill, which he said would make the oil and gas industry safer. The bill gives the Railroad Commission the authority to inspect more than 46,000 miles of interstate pipelines.

“We’ve never actually had the opportunity or the authorization to [address pipeline safety] to the depth that we wanted to,” he said. “We lay a lot of pipe in Texas. You have to make sure it’s safe and you have to make sure it's done correctly." 

But Cyrus Reed, conservation director of the Sierra Club’s Lone Star Chapter, said the bill "barely counts as reform.

“There is some good in the bill on tracking enforcement practices, requiring a strategic plan and improving pipeline safety, but good amendments that would have improved the agency were rejected if they were opposed by the oil and gas industry," Reed said, adding that Sierra Club will work to improve the bill in the Senate.

Never miss a moment in Texas politics with our daily newsletter.