De La Cruz said that last week, she provided the judge, Lauren Farber, a letter from the Brooklyn DA urging his release — and a copy of the Daily News story about her client’s courageous work assisting prosecutors.

Mayor de Blasio also sent a letter to Farber on Thursday advocating for Siguencia Hurtado’s release so he could support his wife, Marta Mizhquiri and two children, all of whom are U.S. citizens.

Farber ordered the 34-year-old to be released on bond despite objections from U.S. Immigration and Customs Enforcement, which argued he was a danger to his community and a flight risk.

William Siguencia (l.) arrested by the feds despite his brave testimony in two Brooklyn homicide cases is expected to be released from detention.

The News reported exclusively last week that Siguencia Hurtado had been arrested and detained on June 29 during his annual check-in with ICE. His arrest was part of President Trump’s crackdown on undocumented immigrants.

William Siguencia Hurtado pictured with his wife Marta Mizhquiri (r.), and their daughter Diana Siguencia, (c.), and his mother Narcisa Hurtado (top l.).

(Debbie Egan-Chin/New York Daily News)

Hurtado came to the U.S. in 2002. He was arrested twice in 2004 — for harassment and statutory rape — but both cases were later dismissed.

At the time, immigration officers temporarily detained him because of his brushes with the law. He made bail, but in March 2005, a judge ordered his removal from the country after he failed to appear at a hearing.

In July 2012, Siguencia Hurtado witnessed the fatal stabbing of a 20-year-old man outside a Bensonhurst nightclub. His testimony helped convict two gang members.

He also gave information to Brooklyn prosecutors in 2012 about a separate homicide case in which he witnessed a fight at a club that later led to three assailants fatally beating a man.

In 2014, with the support of the Brooklyn DA’s office, Siguencia Hurtado decided to come forward to federal authorities in hopes of obtaining permanent status.

Until his arrest in June, he had been allowed to check in annually with federal agents while his wife tried to obtain a visa for him and his legal team fought the removal proceeding.