The Texas legislature moved one step closer to passing a bill that would allow the arrest of a sheriff or constable who refuses detainer requests from federal immigration agents.

It’s the strongest message yet from state legislators to rogue law enforcers.

The bill, which passed the House Committee on State Affairs Wednesday with a 7-4 vote, would allow criminal charges against law enforcement heads in sanctuary cities.

Even though San Antonio is not a sanctuary city, both the San Antonio police chief and the Bexar County sheriff have spoken out against the bill saying it gets in the way of them doing their jobs.

Under this law, if they don't comply with federal immigration agents, they could spend up to a year in jail.

“I’m opposed to it,” Bexar County Sheriff Javier Salazar said. "If you’re an undocumented immigrant, you’re certainly going to think twice before talking to police. And that’s something we just don’t need to be working against."

If senate Bill 4 becomes law, a law enforcement head creates so-called "sanctuary policies," they can be charged with a class A misdemeanor and have their departments fined up to $25,000 dollars.

But not all local law enforcers are against the bill.

"I think the intent is very good," Former Bexar County Sheriff Susan Pamerleau said.

According to Parmerleau, it has always been Bexar County policy to comply with immigration laws.

Parmerleau said that if someone has been detained, it is for a good reason such as having committed a serious or violent crime.

The bill will now go before the full House where it will likely see further changes. But even the biggest opponents say they won't be surprised to see it pass in some form.

The bill did receive some changes from the House Committee on State Affairs now including protections for witnesses and victims of a crime, saying law enforcement will not ask their immigration status.