Representative Diego Bernal called the vote “soul-crushing.”

Almost all Texas Republicans in the House voted to allow police officers to question children about immigration status during Wednesday’s heated debate on so-called sanctuary cities.

The vote was cast during debate on Senate Bill 4, which could jail local law enforcement officials who refuse to assist enforcing federal immigration law or enact such policies. Under the version of SB 4 that passed the Senate earlier this session, local law enforcement agencies are prohibited from enacting policies that stop officers from questioning detained individuals about immigration status.

The initial House version of the bill limited the scope of police authority, only allowing cops to interrogate about immigration status when individuals are under arrest. However, Representative Matt Schaefer, R-Tyler, on Wednesday added the “detention” language back to the House bill.

Representative Diego Bernal, a San Antonio Democrat who called SB 4 “show-me-your-papers legislation” earlier in the debate, then attempted to add an exemption for children to that section of the bill.

Bernal said that all lawmakers, regardless of political party, should be able to agree that children should not be subject to a police interrogation about their immigration status. He challenged lawmakers who planned to vote against his amendment to debate its merits before a record vote was called, but no one accepted and the chamber voted 55-89.

Most of the votes on amendments earlier in the debate fell along party lines, but two Republicans — Jason Villalba, of Dallas, J.D. Sheffield, of Gatesville — voted in support of Bernal’s amendment, along with all present Democrats.

Bernal said the vote was “soul-crushing.”

“I was trying to find something where I believed there was actually common ground,” Bernal told the Observer. “I had talked to a lot of the members individually about it, saying I was going to propose something along those lines, and person to person, they expressed support for it. But I guess they couldn’t vote to it.”

Earlier in the day, a Senate committee approved a bill that would effectively lower state standards for family detention centers in order to license them as child care facilities.

The bill, which was written by a lobbyist for the GEO Group, a prison company that runs the 830-bed Karnes County Residential Center, would allow the detention facilities to detain children who are seeking asylum for much longer than what is currently allowed. The prison firms could skip all the burdensome regulations that other child care facilities must deal with. Critics have called the facilities “baby jails.”

Staff writer Sam DeGrave contributed to this report.