The rise of the sanctuary city movement has created a deep divide among American states, with the nation’s two most populous states taking drastically different stances from each other on cooperating with federal immigration guidelines.

The legality of sanctuary city policies is emerging as a state issue, primarily, because neither states nor cities are legally obliged to help U.S. Immigration and Customs (ICE). Legal scholars are clear that no federal laws are broken by a city refusing to cooperate with federal efforts to detain and deport illegal immigrants.

“The feds can’t tell a state or a local municipality how to handle immigration detainer requests put up by Immigration and Customs Enforcement,” Angela Morrison, a professor at Texas A&M University’s School of Law, told Fox News. “Under the 10th Amendment, it’s up to states and local municipalities to decide whether or not they will comply.”

The dispute over whether to cooperate or not with federal immigration officials is roiling some of the nation’s largest states. One of the strictest state measures aiming to outlaw non-cooperation with ICE is in Texas. On Wednesday lawmakers are set to debate a bill that would ban cities, counties and universities from adopting "sanctuary" policies and also penalize law enforcement officials who fail to comply with federal immigration guidelines.

The Texas bill has sparked strong feelings among immigrant rights activists. One state representative has gone on a three-day hunger strike in protest, and the measure has drawn widespread criticism from Democratic Party lawmakers.

The most hotly debated provision of the bill allows for criminal charges against city or county officials who intentionally refuse to comply with federal authorities' attempt to deport people in the country illegally who already have been jailed on offenses unrelated to immigration. Elected officials could face up to a year in jail and lose their posts if convicted of official misconduct.

“We cannot allow local officials to implement dangerous policies that make it easier for individuals who commit serious crimes to be placed back into our communities," Texas State Sen. Charles Perry, who introduced the legislation, said in a statement. The bill has gained the support of Texas Gov. Greg Abbott, who back in January vowed to pursue legislation to remove from office any official who promotes sanctuary cities.

Opponents of the bill, however, say that the legislation would have a “chilling effect” on immigrants, making them too scared to report crimes or testify in court. They also say a law like this would lead to widespread racial profiling of Latinos by law enforcement officials – a fear that officials in Texas’ biggest city have recently tried to assuage.

"HPD is not ICE and we don't seek to be ICE," Houston Mayor Sylvester Turner said, according to the Houston Chronicle. "In this city we don't profile. We're not going to do that."

Houston Police Chief Art Acevedo noted that the number of Hispanics reporting rape is down 42.8 percent from what it was in the first three months of last year and other violent crimes have registered a 13 percent reporting drop in the Hispanic community.

"This doesn't just affect the immigrant community, it impacts everyone who will need to prove he or she is a citizen.” Victoria Neave, the Texas state representative who on Sunday went on a hunger strike in protest of the legislation, told the Washington Post.

The Texas legislation appears likely to pass in the state’s Republican-controlled Congress, but legal experts say removing from office any elected official who is found guilty of violating the law would still be an uphill battle.

“Even if they amend the statutes to add this, the state would have to clarify the general ground for removal and then get a district attorney to press charges and then it would go to a trial by jury,” Morrison said. “Getting rid of the trial by jury would be the hardest part because voters in Texas really want to protect that right.”

Meantime in Colorado, the state’s Senate gave initial approval Monday to a bill that would allow victims of crime committed by illegal immigrants to sue municipalities with sanctuary city policies, as well allow the state to withhold tax money. Senate Bill 281 still must pass a roll-call vote before moving to the House, where it faces certain death amid Colorado’s Democratic majority. A similar bill was shot down this session that would have allowed public officials to be arrested over sanctuary city policies.

On the opposite side of the sanctuary city debate are states like California. Lawmakers in the Golden State earlier this month passed a bill that blocks state and local police cooperation with federal immigration authorities. Senate Bill 54, unofficially known as the "sanctuary state" bill, blocks state and local law enforcement agencies from using their resources – whether that be money, properties, equipment or personnel -- to help with federal immigration enforcement.

While the bill drew criticism from some law enforcement officials in California and concerns that it would antagonize President Trump, Kevin de León -- the leader of the state Senate and sponsor of the bill – argued it would improve policing throughout the state.

“Our communities will become more, not less, dangerous if local police are enlisted to enforce federal immigration laws,” he said, adding that the bill was a “rejection of President Trump’s false and cynical portrayal of undocumented immigrants as a lawless community.”

The Trump administration has tried to force some sanctuary cities to cooperate by issuing an executive order seeking to withhold funds from such cities. However, a federal judge in San Francisco this week blocked that order, saying plaintiffs challenging the order are likely to succeed in proving it unconstitutional.