RALEIGH — A Republican measure in part designed to penalize any local governments with “sanctuary” policies toward immigration by withholding their tax dollars narrowly cleared a North Carolina House committee Tuesday.

The judiciary panel voted 6-5 for the bill even after it was changed by a GOP committee member to make it easier for those cities and counties to receive tax distributions again quickly if they demonstrate they have eliminated those policies.

Rep. Harry Warren, R-Rowan, one of the bill’s primary sponsors, opposed the amendment by Rep. John Faircloth, R-Guilford, that also passed by a one-vote margin. But Warren still urged the bill’s passage. He said it’s not designed as a punitive measure but to ensure compliance with federal and state immigration laws.

A 2015 state law bars local government policies that discourage compliance with federal immigration law or police from collecting information about the immigration status of suspects and others. Associations representing the state’s municipalities and counties say they don’t know of any locality with such policies. The attorney general’s office would receive and investigate complaints from anyone alleging local governments are violating the law.

“This is simply a deterrent to say, ‘Let’s keep everybody on the same page,’” Warren told the committee.

Tax distributions that local governments could lose include revenue on beer and wine, and piped natural gas. Municipalities also would lose road-building funds.

The measure passed despite criticisms by Democratic lawmakers and advocates for immigrants that a provision making it more difficult for suspects unlawfully in the country to get out of jail while awaiting trial could face constitutional challenges.

“I think we’re setting ourselves up for another hefty legal bill,” said Rep. Pricey Harrison, D-Guilford.

An amendment failed that would have eliminated a presumption for judges to deny bond to any criminal suspect unlawfully in the country who is either charged with a violent crime or is the subject of a federal effort to be removed from the U.S. Instead, the amendment by Rep. Joe John, D-Wake, would have made those circumstances among many others a judge would have to consider.

The bill now heads to another House committee.

Gary D. Robertson

Associated Press