A federal court has put an end to a crucial component of Donald Trump's “zero tolerance” immigration policy, ordering injunctive relief for asylum seekers held in immigrant detention centres.

In his 38-page ruling, US District Judges James Boasberg said Immigration and Customs Enforcement (ICE) violated its own policies by indefinitely detaining all immigrants crossing the US-Mexico border, including those legally seeking asylum. The case focused on Ansly Damus, a Haitian teacher who has been held in an Ohio detention centre for nearly two years despite being granted asylum twice.

The American Civil Liberties Union, which filed the lawsuit on Mr Damus’ behalf in March, said in a statement that "the ruling in the Damus case stands for the principle that the government cannot apply a blanket policy of detaining asylum seekers for the purpose of deterring people from coming into the United States to seek asylum".

Under Mr Trump, the federal government has appealed what’s known as "humanitarian paroles" for asylum seekers like Mr Damus, forcing migrants to be held indefinitely in ICE field offices in Detroit, El Paso, Los Angeles, Newark and Philadelphia.

Now, more than a thousand migrants held in those five facilities will have case-by-case reviews of their asylum applications. The federal court’s decision appeared to boil down to one simple rule: following the law.

"To be clear, in finding that injunctive relief is warranted in this case, this court is simply ordering that defendants do what they already admit is required– follow the ICE Directive when adjudicating asylum-seekers’ detention," Mr Boasberg wrote in his ruling on Monday. "The directive provides a framework of minimum protections for those claiming refugee status, and, as defendants acknowledge, it is binding on the government. To mandate that ICE provide these baseline procedures to those entering our country – individuals who have often fled violence and persecution to seek safety on our shores – is no great judicial leap."

‘Families belong together’ protests over Trump immigration policy Show all 8 1 /8 ‘Families belong together’ protests over Trump immigration policy ‘Families belong together’ protests over Trump immigration policy Mishawaka, Indiana AP ‘Families belong together’ protests over Trump immigration policy Washington DC AFP/Getty Images ‘Families belong together’ protests over Trump immigration policy New York Mayor Bill De Blasio speaks in Tornillo, Texas alongside the many other US mayors who have called for detained immigrant children to be reunited with their families AP ‘Families belong together’ protests over Trump immigration policy Albuquerque Mayor Tim Kelle leaves a teddy bear as a gift for detained immigrant children in Tornillo, Texas AP ‘Families belong together’ protests over Trump immigration policy Seattle Mayor Jenny Durkan and Los Angeles Mayor Eric Garcetti leave sandals as gifts for detained immigrant children in Tornillo, Texas AP ‘Families belong together’ protests over Trump immigration policy San Diego, California EPA ‘Families belong together’ protests over Trump immigration policy US embassy, Mexico City AFP/Getty Images ‘Families belong together’ protests over Trump immigration policy San Diego, California EPA

The US government’s “zero tolerance” policy announced earlier this year began the systematic separation of immigrant families entering the US through the southern border, as well as the indefinite detention of asylum seekers and many other migrants.

Under former President Barack Obama, migrants seeking asylum were typically provided asylum after passing a "fear interview." However, under Mr Trump, migrants who pass fear interviews often remain held in centres without any way of knowing if or when they will be released.

Mr Trump has already been forced to walk back other components of his hard-line immigration policy, signing an executive order ending the separation of immigrant families at the border. With Tuesday’s ruling, his administration will once again be required to walk back their policies.