As the White House announced plans Wednesday to end federal grants to sanctuary cities, a high-stakes, highly partisan showdown over how to close them was already underway in Texas.

It's a showdown the Trump administration and opponents of illegal immigration will likely be watching closely to look for clues as to how they might be able to shut down these cities nationwide — a much more contentious and constitutionally perilous undertaking.

In Texas, things are already contentious. The newly elected sheriff for Austin and the county it sits in, Travis County, is refusing to comply with federal deportation requests she doesn't agree with. Travis County Sheriff Sally Hernandez has said she would abide by deportation requests for people charged with serious crimes such as murder — but that she would not promise to abide by all requests.

Gov. Greg Abbott (R), who won a showdown with the sheriff in Dallas in 2015 over sanctuary cities,  is demanding that Hernandez change her mind — or risk losing some $1.8 million in state grants and even her job.

“We will remove her from office,” Abbott warned in an interview Wednesday morning on Fox News.

Abbott is calling for legislation to ban sanctuary cities, remove any officeholder who refuses to comply with federal deportation requests and even impose criminal and financial penalties on that person. A bill to ban sanctuary cities has been introduced in the GOP-controlled legislature.

In some ways, the battle between governor and sheriff over these cities is uniquely Texan. Texas, with its conservative state government and pockets of liberal cities, is one of the only states where a flashy showdown between governor and sheriff could take place.

But Abbott is also the first up to bat in a new paradigm in which the president has signaled he has a zero-tolerance policy for cities that shelter immigrants who are in the country illegally. And opponents of sanctuary cities will be watching to see if he can help them blaze a path through the web of constitutional, legal and political hurdles that sanctuary city opponents in more liberal states — or even the federal government — could use in a way they never could under the Obama administration.

Jessica Vaughan, with the conservative-leaning Center for Immigration Studies, says the Trump presidency is already changing the landscape.

“I expect [Immigration and Customs Enforcement] to go back to saying: This is not a request. This is not optional. When we issue a detainer, we expect you to honor that just as you would for any other law enforcement agency in the country,” Vaughan said. “That will reinforce what Governor Abbott is trying to do.”

Sanctuary city opponents could also flex their newfound muscle by working with the Department of Justice to make public which immigrants the local governments refuse to help deport, along with their criminal histories. Even their names could be made public, Vaughan suggested.

“That will create a dynamic where the sheriff could have to start explaining why these individuals were released, and people will have the opportunity to judge for themselves whether it makes sense,” she said.

Research has indicated that immigrants in the country illegally don't commit crimes at a higher rate than legal residents, but opponents say no one in the country illegally should be allowed to commit a crime and stay.

We could also start to see more lawsuits from residents of these cities to pressure their local law enforcement agencies to abide by deportation requests. Vaughan pointed to a recent case in which an Illinois resident whose family member was killed by an illegal immigrant successfully sued the sanctuary county that released the immigrant, arguing there was a reasonable expectation that local law enforcement would follow federal rules to keep its citizens safe.

The Texas standoff could provide an opportunity for the Trump administration to step in and ask a federal judge to demand that cities hand over immigrants who are not in the country legally. They could argue it's technically against the law to shield immigrants from deportation, per the federal Anti-Harboring Law.

Pursing a legal challenge is a risky endeavor. The existence of a sanctuary city, with clearly stated policies that might be in conflict with federal law, has never been challenged in court. There's not even an agreed-upon definition of what a sanctuary city is.

It's true if the Trump administration won, it could be game over for the current system in those cities. But immigration experts aren't sure such a demand would hold up in a court of law.

Trump's executive action demanding sanctuary cities lower their walls or else lose federal funding tugs at a fundamental tension between the rights of localities to make and enforce their own laws and the rights of the federal government to make and enforce its laws.

“I think it's pretty clear that the federal government cannot tell local governments how to run their affairs in minute detail, without at least paying for all of it,” said Alex Nowrasteh with the libertarian-leaning Cato Institute.

Some constitutional scholars also point to a recent Supreme Court ruling on the Affordable Care Act that says it's unconstitutional for the federal government to be a “gun to the head” of state and local governments.

The constitutionality of a state government using political, financial and legal levers to close these cities is less clear cut, since each state has its own rules about how much authority it can exert over localities.

Which brings us back to Texas and the fact that the showdown between governor and sheriff is not likely to play out in states across the United States, which are either mostly liberal or mostly conservative. The real battle will be between the federal government and liberal cities such as Oakland, Las Vegas, New York and Chicago.

As America enters a new tough-on-immigration reality with few definitive answers, the battle in Texas could help Trump and his supporters nail down a blueprint to use nationwide.