Some immigrants living in the country illegally and accused of crimes sit in legal limbo, caught in a tug of a war between local prosecutors and federal immigration authorities who won't let them appear in court because they fear being denied the opportunity to deport them.
Advocates for immigrants say the hardball tactics of Immigration and Customs Enforcement are blocking due process rights, creating chaos and forcing runarounds in court systems to get immigrants who are accused of crimes in front of judges.
Under Republican President Donald Trump, the agency is specifically targeting suspects not yet found guilty, a departure from the Obama administration, which focused primarily on those convicted, attorneys say. Advocates argue ICE has also sometimes used criminal allegations against immigrants in their deportation efforts without letting them answer the charges.
"This is now becoming a kind of full-fledged war between the federal government and states and localities," said Muzaffar Chishti, director of the Migration Policy Institute's office at New York University School of Law.
While it's unclear how many defendants are not being turned over to appear in court, cases are popping up around the country, largely in so-called sanctuary cities and states where local authorities don't cooperate with the federal government on immigration enforcement.
ICE doesn't track how many detainees have pending criminal charges or how often they're denied release to state custody for court proceedings, an agency spokeswoman said.
In one case, a man accused of raping a child was deported - essentially set free in his home country - instead of facing trial.
ICE is not required to comply with judges' orders that a detainee appear in state court. And federal authorities say they won't do that if they're unsure whether local officials will return the person to federal custody when the proceeding is over.
ICE works with prosecutors to transfer detainees to criminal custody so they can resolve their cases, but won't hand a defendant over unless local authorities guarantee the person won't be released, Acting Director Thomas Homan told The Associated Press in an interview last month.
"We do the best we can to make sure these people face justice, but we've also got to do our job," Homan said. "If you really want to enforce criminal law, then work with us. We want to do the same thing, but we have to be partners in this."
The issue has come to a head in Massachusetts, where the state Supreme Court last year specifically prohibited local law enforcement officials from honoring so-called detainer requests. ICE responded by largely refusing to allow detainees to be taken to state court hearings.
In Connecticut, New York and California, lawyers say it has become a bigger problem under the Trump administration because ICE is picking up more immigrants with pending charges.
Sometimes detainees are sent to distant detention centers, making their return to court virtually impossible. For instance, Tanika Vigil of the Rocky Mountain Immigrant Advocacy Network said that some detainees in Colorado have criminal cases in Utah but that local authorities won't transport them because it's too difficult and costly.
Mary Moriarty, chief public defender in Minnesota's Hennepin County, estimated that ICE has kept about 30 people from having their criminal cases resolved or even being assigned public defenders, meaning no one advocates for their appearance in criminal court.
"ICE is arresting folks with criminal charges pending, knowing full well that by doing so, it is interfering with the criminal justice process," said Raha Jorjani of the public defender's office in Alameda County, California.
ICE argues communities that don't honor its requests to hold immigrants are endangering the public by allowing suspects back onto the street. They point to the case of a man released in Philadelphia after assault charges were dismissed, despite an ICE detention request, who later went on to be charged with child rape.
But federal judges have ruled that holding someone solely at ICE's request is unconstitutional.
In Massachusetts, prosecutors were ready to go to trial in March in the case of Guatemala native Victor Ramirez, accused of child rape and other charges. He was arrested by ICE as he left a probation office in September, and the agency refused to release him back to state custody for his trial, a spokeswoman for the Essex prosecutor's office said.
A state court judge issued a warrant for Ramirez's arrest when he didn't show up in court. But Ramirez, who was facing up to life in prison if convicted, was deported last week, ICE said.
"The victim cannot seek justice in court, nor can the defendant seek justice in court," said the prosecutors' spokeswoman, Carrie Kimball-Monahan.
Ramirez's attorney didn't return a phone call from the AP.
At least one court in Connecticut is using video conferencing to allow detainees to participate in their hearings because they're housed in Alabama, said Elisa Villa, a supervisory assistant public defender. ICE transfers detainees back to state court in Connecticut only rarely, Villa said.
Most troubling is that pending criminal charges are often used against detainees in their immigration cases, many immigration lawyers told the AP.
Connecticut lawyer Anthony Collins said an immigration judge recently refused to release his client on bond, and approve an application that would shield him from deportation, because of his client's assault and disorderly conduct charges.
In order to get the man transferred to state custody to resolve his criminal case, Collins said, he had to promise that his client wouldn't be bailed out until his case is adjudicated and that he would notify ICE when that happens so he can be returned to federal custody.
Deportation may not be a bad deal for someone facing life in prison in the U.S. But not allowing detainees - some of whom might be acquitted - to resolve even minor charges before being deported can prevent them from ever returning legally, attorneys say.
That was the concern in the case of Samuel Pensamiento, who was charged with leaving an accident and blocked from appearing in court until the American Civil Liberties Union of Massachusetts intervened. A federal judge in March ordered ICE to transfer Pensamiento to state court for his hearing and explicitly required a sheriff to return him to ICE custody afterward.
Attorneys in Massachusetts had hoped that would help them get more detainees back in court, but ICE has denied requests after that decision, lawyers said.