In another blow to the Trump administration’s policies on immigration, a federal court on Monday blocked the systematic detention of migrants who have shown credible evidence that they were fleeing persecution in their home countries.

In a sharply worded ruling, Judge James Boasberg of the Federal District Court for the District of Columbia found that the government’s own directive calling for asylum applicants to be freed when appropriate while their cases are pending “has been honored more in the breach than the observance.”

At issue is the right of those seeking shelter in the United States to be released while their applications for asylum are making their way through the courts, a process that can take years. While the government is entitled to hold them in detention, a 2009 directive provides that those who have shown what is known as a “credible fear” in an initial interview have a right to be considered for release.

In a court challenge, lawyers for nine plaintiffs who had been held in detention presented evidence that parole rates under the Trump administration have plummeted more than 90 percent to “nearly zero,” a shift they attributed to the government’s new “zero-tolerance” policy on immigration and an attempt to deter would-be asylum seekers from traveling to the United States and making a claim.

Judge Boasberg said the government denied that it had any blanket policy of denying release to asylum applicants, but failed to rebut the plaintiffs’ figures demonstrating the steep drop in releases since Mr. Trump took office.

His preliminary injunction orders the government to conduct individualized reviews to determine whether a person is a flight risk, poses a national security threat or is a danger to the community before denying parole as otherwise advised under the 2009 directive.

The lawsuit was brought by a group of asylum seekers, all of whom had been detained after passing their credible fear interview and demonstrating they would not flee or be a threat to others. They were represented by Human Rights First, the American Civil Liberties Union, the Center for Gender and Refugee Studies and the Covington & Burling law firm.

“The ruling confirms that the government can’t default to detaining people out of hand. Rather, they must follow policy which they themselves outlined nine years ago,” said Hardy Vieux, legal director at Human Rights First, which represents refugees.

The lawsuit involves five Immigration and Customs Enforcement field offices, which, plaintiffs claim, denied nearly all parole requests by asylum seekers since early 2017: Detroit, which oversees Michigan and Ohio; El Paso, which covers New Mexico and West Texas; Los Angeles; Newark; and Philadelphia.

The lawsuit states that the immigration agency had been granting parole to more than nine out of 10 asylum seekers until President Trump took office last year.

“The Government’s response to these figures is underwhelming at best,” wrote the judge, adding that “there are questions” as to whether the five field offices are following the parole directive.

More than 1,000 asylum seekers are estimated to have been denied parole in the five ICE districts cited in the case, according to the lawsuit.

One of the plaintiffs, Ansly Damus, an ethics teacher from Haiti, has been detained in Ohio for more than a year and a half. Mr. Damus fled his home country after his criticism of a government official jeopardized his safety. A gang that supported the official attacked him in 2014, breaking several bones and setting his motorcycle ablaze. It also threatened to kill him.

On arrival at the border in Southern California, Mr. Damus presented himself to immigration authorities and requested asylum. He passed his credible fear interview in December 2016, and in April 2017 was granted asylum by a judge. Despite that, he has remained behind bars while the government appeals his case.

“I have not breathed fresh air or felt the sun on my face, and I never know if it is cold or hot outside, if the sun is out, and if the seasons are changing,” Mr. Damus said in the complaint filed by the organizations on his behalf in March.

A version of this article appears in print on , on Page A11 of the New York edition with the headline: Court Rejects Default Policy To Jail Seekers Of U.S. Asylum. Order Reprints | Today’s Paper | Subscribe