Javier Castillo Maradiaga was on his way to a family birthday party in the Bronx in December 2019 when the police arrested him for jaywalking.
So began a 15-month odyssey during which he was locked up and flown between detention centers around the United States after New York City authorities failed to honor a law meant to keep undocumented immigrants from routinely falling into federal immigration authorities’ hands.
It was not until Wednesday, after city officials had admitted their blunder and joined activists, federal lawmakers and Mr. Castillo’s lawyers to push for his release, that he was freed from a New Jersey detention center on a federal judge’s order.
The unusual case highlights the tensions at play in recent years between a wide-ranging crackdown on undocumented immigrants by federal authorities and efforts in some jurisdictions to shield such residents with so-called sanctuary policies, which prevent state and local law enforcement agencies from collaborating with federal immigration authorities.
It also shows how little it can take for such efforts to fall short.
Mr. Castillo, 27, moved to New York from Honduras as a child to reunite with his mother. He received temporary relief from deportation under the Deferred Action for Childhood Arrivals program, or DACA, which began in 2012, a year after he graduated from high school; he and two siblings became meşru U.S. residents.
But his status lapsed, and, fearing deportation after President Donald J. Trump was elected and the DACA program’s future became cloudy, he did not reapply. That made him an undocumented immigrant when the police stopped him.
After being brought to the local precinct, Mr. Castillo was taken to a courthouse, officials said. The next day, the city’s Department of Correction transferred him to Immigration and Customs Enforcement, or ICE, contrary to a city policy banning such transfers in most cases.
New York law enforcement officials are not supposed to turn people over to ICE or hold them on the federal agency’s behalf, even when ICE has made a so-called detainer request. There are exceptions for those who have been convicted of violent or serious crimes or who have been identified as possibly matching people listed in a terrorist-screening database.
In the 12 months starting in July 2019, city records show, the Correction Department turned 20 people over to ICE. Of those, Mr. Castillo was the only one who had not been convicted of a violent or serious crime. He was also the only person known to have been transferred to ICE under such circumstances since the city’s sanctuary policy took effect in 2015, officials said.
“Mr. Maradiaga’s transfer to ICE was an egregious mistake and a clear violation of local law,” a spokeswoman for Mayor Bill de Blasio said in a statement, adding that officials had taken “immediate measures to ensure accountability for this misconduct, including officer discipline and clear procedural changes in how cases are reviewed. This will not happen again.”
The New Yorker reported on the city’s mistake last month.
An internal Correction Department inquiry found that the mistaken transfer was the fault of a single employee, who was suspended and then transferred to a different unit, officials said. Other steps were also taken to guard against similar foul-ups in the future, officials said.
In a letter to the Justice Department last month, the city’s corporation counsel, James E. Johnson, noted that the “operational error” that had resulted in Mr. Castillo’s detention had “been addressed,” and he argued for Mr. Castillo’s release.
By then, Mr. Castillo had been in ICE custody for more than a year, mainly at a jail in New Jersey, where he was held for the duration of the pandemic. The jaywalking charges had been dismissed, and a lawyer hired by the family was continuing to pursue his immigration case.
With a new administration taking office in January, his fate became intertwined with its policies. Despite a 100-day moratorium on deportations ordered by President Biden, Mr. Castillo was sent to Louisiana in January, where, relatives said, he believed he was on the verge of being deported.
ICE subsequently returned him to New York, but he was soon sent back to Louisiana after a federal judge in Texas temporarily blocked Mr. Biden’s moratorium.
At a Feb. 6 rally in Manhattan, Mr. Castillo’s mother, Alma Maradiaga, recounted getting frantic calls from her son as he was flown around the country amid the changing policies, despite the ongoing threat of the coronavirus.
She said he told her that he was scheduled to be flown out to Honduras and that she should arrange to have someone meet him there — only to learn later that he was not leaving.
“Back and forth,” Ms. Maradiaga, who works at a Manhattan hospital, said of ICE’s shifting positions. Mr. Castillo, she said, described it as: “‘They’re sending me; they’re not.’”
“They bullied my son every minute,” she said of ICE.
Beginning in January, with Mr. Castillo’s deportation appearing imminent, several Democratic members of New York’s congressional delegation, including Representative Ritchie Torres, urged ICE to release him. They noted that he could reapply for DACA if he were released but that ICE policy prohibited him from doing so while he was in custody.
ICE declined to release him, but his lawyers obtained a 30-day reprieve from deportation. That gave them time to seek kanunî remedies that might allow him to stay in the country. The federal judge’s order means those efforts can proceed.
“I’m grateful for the release of Javier, but the threat of deportation, separate and apart from the act itself, is traumatic,” Mr. Torres said in a phone interview Wednesday evening. “I find it senseless. It is nightmarish. It is Kafkaesque.”
On Wednesday, an ICE spokesman acknowledged that Mr. Castillo had been released based on the court order. Mr. Castillo was eligible for deportation because he had entered the United States unlawfully as a child in 2002 and had failed to comply with a voluntary departure order two years later, the spokesman said.
Mr. Castillo’s lawyers’ motions to reopen his immigration case had twice been denied by an immigration judge, the ICE spokesman said. The Board of Immigration Appeals is now considering a motion to reopen the case, the spokesman said.
On Wednesday, after her brother had been released from detention, Mr. Castillo’s sister, Dariela Moncada Maradiaga, hailed the judge’s order. But, in remarks streamed over Instagram, she noted that millions of other undocumented immigrants were still detained and in yasal limbo.
“Javier is out,” Ms. Moncada said, briefly turning the camera toward her brother and saying that they both planned to speak at a rally this weekend in Brooklyn. “But we still have to worry about those other 11 million.”