A federal judge ruled on Monday that the Department of Homeland Security has violated its own policies by refusing to release most asylum-seekers from immigration detention even if they are likely to win their asylum case.

District Judge James Boasberg in the District of Columbia ordered the department to stop making blanket determinations against most asylum-seekers and resume the long-standing practice of deciding each applicant's detention status on a case by case basis.

Boasberg pointed to data provided by the nine plaintiffs who filed the lawsuit to show how dramatically detention determinations have changed under President Donald Trump.

In recent years, Homeland Security allowed more than 90 percent of asylum-seekers who had proven they have a "credible fear" of returning to their home country to be released in the U.S. to await their final hearing before an immigration judge. Since President Donald Trump took office, those rates plummeted to 8 percent in Los Angeles, 2 percent in Detroit, and 0 percent in El Paso, Philadelphia and Newark. the locations where the plaintiffs are being held.

"Although Benjamin Disraeli decried 'lies, damn lies, and statistics,' the numbers here are irrefutable," Boasberg wrote. "The dramatic departure in parole-grant rates from years past has not been explained in any way by (the government)."

Foreigners can be granted asylum if they prove they have a "credible fear" that they will be persecuted in their home country based on their race, religion, nationality, or are members of a particular social group or political opinion.

Attorney General Jeff Sessions has claimed that the asylum system is being abused by foreigners who know how to game the system to win entry to the U.S. He has also argued that current asylum laws are too broad, announcing last month that victims of domestic violence or gang violence are no longer automatic grounds to win asylum in the U.S.

Boasberg's ruling did not address that change. Instead, the judge issued a nationwide, preliminary injunction that requires the Department of Homeland Security to abide by its own 2009 directive that requires individualized reviews of each case.

The judge ruled that the department has been making blanket detention decisions, contrary to the 2009 directive.

"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," wrote Boasberg, who was first appointed to the D.C. Circuit by President George W. Bush. "Rather, the issuance of injunctive relief in this case serves only to hold Defendants accountable to their own governing policies and to ensure that Plaintiffs receive the protections they are due under the Parole Directive."

The lawsuits was filed in March by legal groups representing nine jailed asylum-seekers.

The plaintiffs include an ethics teacher from Haiti who was attacked after teaching his class about government corruption, a Venezuelan who was threatened for participating in marches opposing the country's communist government, and a gay Honduran man who was threatened at gunpoint.

One has been held in U.S. custody for over two years. Others have been held for months at a time, claiming they have received little explanation for why they continue to be detained.

The judge did not order that the plaintiffs be released from custody, only that Homeland Security officials must show that they are making fair detention determinations for each person. The main grounds for denying parole to an asylum-seeker are that they pose a public safety threat or represent a flight risk.

The practical effect, according to attorneys who filed the lawsuit, is that the Trump administration can no longer use indefinite detention as a deterrent for would-be asylum seekers.

"This ruling means the Trump administration cannot use indefinite detention as a weapon to punish and deter asylum seekers," said Michael Tan, senior staff attorney with the ACLU’s Immigrants’ Rights Project.

The Department of Homeland Security said it not not comment on pending litigation.