More than a year before Texas Gov. Greg Abbott punished Travis County — yanking away $1.5 million in state grants — for scaling back cooperation with federal immigration officials, he fired a warning shot toward Dallas County.

“'Sanctuary City' policies,” Abbott wrote to Sheriff Lupe Valdez, “will no longer be tolerated in Texas.”

His October 2015 letter came after Valdez — in comments she later said were misconstrued — said she would more closely scrutinize requests from U.S. Immigration and Customs Enforcement to hold non-citizens in county jails after they were otherwise processed.

Abbott, in his fiery response, said Texas should mull ways to hold counties “fully financially responsible for the actions of any illegal immigrants” who are released after a sheriff ignored a federal detainer request — such as a man who murdered a woman in San Francisco in 2015.

The same day Abbott wrote that letter, 16 former inmates with ICE detainers sued Dallas County in federal court, accusing the county of violating their constitutional rights by refusing to release them on bond. The lawsuit has since ballooned to 22 plaintiffs, including a man who turned out to be a U.S. citizen.

Dallas County’s experience illustrates what looks like a financial lose-lose for local governments in the “sanctuary” debate: They face big risks regardless of how they carry out federal immigration policy.

On one side, state lawmakers are fast-tracking legislation to penalize local governments that refuse to comply with federal detainer requests by cutting state funding and holding them liable if a released immigrant commits further crimes.

On the other, local governments say that holding people for ICE ties up jail space and costs local taxpayers money — and exposes them to lawsuits that are seeing early success in federal courts. The possibility that Dallas County will have to pay damages or negotiate a settlement grew last month after a judge ruled that an immigration detainer alone isn't enough to keep someone in jail.

“We’re kind of in a conundrum, said Melinda Urbina, a spokeswoman for the Dallas County Sheriff’s office. “We just decided for right now that we’ll honor [ICE] requests until we get told by a higher authority.”

Pressuring local governments

ICE generally issues the requests when it believes someone being held on local or state charges might also be deportable for violating the U.S. immigration law — ICE typically asks local jails to hold an inmate an extra 48 hours so its agents can take over custody and possibly start removal proceedings.

Senate Bill 4, which has breezed through the Senate, would punish local governments that refuse to honor detainer requests by canceling state grants, making them subject to civil fines and even criminally prosecuting local officials who don't comply.

Sen. Charles Perry, the bill's author, argues the policy is needed to prevent the release of undocumented immigrants who may otherwise commit violent crimes. But police chiefs in Austin, San Antonio and Houston worry the bill would fuel distrust in law enforcement and discourage immigrants from reporting crimes.

Texas jails rarely refuse ICE detainer requests, according to a 2016 Texas Tribune analysis. But the issue drew national attention after Abbott followed through on a promise to cut Travis County’s state funding after its sheriff, Sally Hernandez, announced her plan to only selectively comply with detainers, releasing lower-level offenders once judges allow them to post bond.

State Sen. Charles Perry, R-Lubbock, answers questions regarding Senate Bill 4, better known as the anti-"sanctuary" bill, on Feb. 7, 2017, in the state Capitol in Austin. Marjorie Kamys Cotera

Footing the bill

Last year, Texas counties spent about $55 million jailing more than 42,000 inmates with detainers, according to a Texas Tribune analysis of data collected by the Texas Commission on Jail Standards. Dallas County spent roughly $7 million on such inmates last year, according to the data.

At the same time, Texas counties collected just $4.7 million in federal grants to offset the cost of jailing inmates on detainers.

The data can be misleading because it’s not clear how much the detainers themselves cost counties — local officials say it's hard to separate the time immigrants would ordinarily spend in jail on local charges from any extra time an ICE detainer may add.

State Rep. Charlie Geren, who has proposed legislation similar to SB 4 and plans to file a new bill addressing some local concerns, said he doesn't believe the proposed legislation would add more burden to local governments.

“I think it’s like [Lt. Gov. Dan] Patrick’s bathroom bill,” Geren told the Tribune. “You’re probably making a big deal out of nothing.”

Asked about the Dallas County lawsuit, he said: “If there’s a federal detainer on [the inmates], then it’s ICE’s problem ... I’m guessing the federal judge will throw that out.”

That has yet to happen.

Nearly two dozen former Dallas County inmates are challenging their extra detentions, arguing, in part, that the county violated their Fourth Amendment rights by holding them with an ICE detainer but without a warrant. A federal judge agreed.

The former inmates include Ricardo Garza, a U.S. citizen who was booked on charges of driving while intoxicated in October 2015. The county jailed him for more than a month under an ICE detainer — not allowing him to post bond until his attorney produced evidence that Garza had become a U.S. citizen when his mother naturalized in 1984.

Ricardo Garza, a U.S. citizen who was jailed for more more than a month under an ICE detainer, is now suing Dallas County. mug shot

He wasn't the first citizen to be mistakenly flagged by ICE: Texas jails held 399 U.S. citizens under ICE detainers between 2003 and November 2015, according to data compiled by TRAC Immigration, a Syracuse University research project.)

In January, U.S. District Judge Sidney Fitzwater allowed the Dallas lawsuit to proceed. His order called detainers “merely a request, not a directive,” and he wrote that the plaintiffs “plausibly allege a violation of the Fourth Amendment.”

A legal trend

Fitzwater’s order followed several other court rulings saying authorities needed a warrant — not just a detainer — to hold suspected illegal immigrants. Those include a high-profile decision from a U.S. district court in Illinois that applied to several states but not Texas.

Elsewhere, counties are settling detainer cases out of court. In 2014, Lehigh County, Pa., agreed to pay $95,000 to a U.S. citizen mistakenly jailed under an ICE detainer.

Those out-of-state cases have alarmed Texas county officials.

“We will end up being sued for a number of reasons,” El Paso County Judge Veronica Escobar testified to lawmakers this month. “Who pays that? The local property taxpayer.”

If the state forces local governments to comply with ICE requests, Dallas County Judge Clay Jenkins said, it should also offer financial help for any resulting lawsuits. "They definitely should be the ones to pay for that.”

Texas Attorney General Ken Paxton’s office did not respond to a question about whether it would help local governments fend off legal challenges.

Paxton has sought to assure lawmakers that SB 4 passes constitutional muster. In an unusual letter issued before the bill cleared the Senate, Paxton suggested an appeals court would reverse the Illinois ruling, and he offered other opinions about why the legislation would withstand legal scrutiny.

Some immigration attorneys have called his opinion highly speculative and unsupported.

“I think the federal judges have made it pretty clear what the law is,” said Eric Puente, an attorney for plaintiffs in the Dallas County lawsuit. “That’s a problem because ultimately the local taxpayers are paying for [any lawsuits]."

Julián Aguilar contributed to this story.