(Reuters) - A U.S. judge on Wednesday struck down Trump administration policies aimed at restricting asylum claims by people citing gang or domestic violence in their home countries and ordered the U.S. government to bring back six deported migrants to reconsider their cases.

FILE PHOTO: Asylum seekers wait on the Mexican side of the Brownsville-Matamoros International Bridge after being denied entry by U.S. Customs and Border Protection officers near Brownsville, Texas, U.S., July 25, 2018. REUTERS/Loren Elliott/File Photo

The ruling is the latest legal setback for the White House on immigration. Last month, a judge in San Francisco ordered a halt to a policy that prevented those entering illegally from Mexico from seeking asylum.

The policy at the center of Wednesday’s ruling sought to limit the ability of immigrants to fight expedited deportation by narrowing the grounds for claiming “credible fear” if they returned home, the first step in a long asylum process. Thousands of people have traveled in caravans this year toward the southern U.S. border to escape gang violence and poverty in Honduras and El Salvador.

The policy was challenged in a District of Columbia lawsuit brought by a dozen adults and children. U.S. Judge Emmet Sullivan said in a 107-page opinion the policy violated both immigration and administrative law.

“And because it is the will of Congress - not the whims of the executive - that determines the standard for expedited removal, the court finds that those policies are unlawful,” Sullivan wrote.

In a statement, the Department of Justice said administration policies sought to follow Congress’ requirement that asylum be limited to those with a fear of persecution based on their race, nationality, religion, political opinion or membership in a social group.

The department filed a request to stay the court’s orders while the government appealed. Sullivan had not responded to that request.

The White House also criticized the decision, saying in a statement that the ruling would further overwhelm immigration courts with “meritless cases” and encourage illegal immigration to the United States.

Sullivan, an appointee of U.S. President Bill Clinton, made headlines on Tuesday for his fierce criticism of Michael Flynn, President Donald Trump’s former national security adviser, for lying to FBI agents.

For the last three months of 2017, the most recent numbers, the government conducted about 6,000 credible fear interviews monthly. The vast majority passed those interviews, allowing them to make their case for asylum in front of a U.S. immigration judge.

Jennifer Chang Newell, an American Civil Liberties Union attorney representing the asylum seekers, said the ruling “is a defeat for the Trump administration’s all-out assault on the rights of asylum seekers.”

The ruling clears the way for four mothers and two children to be returned to the United States, she said.

The administration has said that the asylum process is being abused by people who have frivolous claims but are able to stay in the country while their cases are being decided.

In a separate case, U.S. District Judge John Tigar in San Francisco on Wednesday extended his previous order that blocked Trump’s policy to bar those entering illegally from Mexico from seeking asylum.

The preliminary injunction ordered by Tigar will remain in place while the litigation unfolds, unless the U.S. Supreme Court intervenes.

Illegal crossings at the southern border have dropped dramatically since the late 1970s. But in recent years, applications for asylum have ballooned, and more Central American families and unaccompanied children are migrating to the United States.

On Tuesday, the United States committed billions of dollars toward development in Central America and Mexico as part of a plan to curb illegal immigration.