WASHINGTON (AP) — A federal judge on Wednesday blocked Trump administration policies that prevented immigrants who suffered gang violence in their home countries or domestic violence from seeking asylum.

U.S. District Court Judge Emmet Sullivan declared that some of the guidance that then-Attorney General Jeff Sessions issued this year by cannot be used to determine whether an immigrant has a credible fear of persecution or torture in their home countries, the first step to making an asylum claim in the U.S.

The judge said the administration's policy on asylum seekers violates federal immigration law and that "it is the will of Congress - not the whims of the executive" that sets the standards for expedited removal.

It was yet another legal blow for President Donald Trump's efforts to harden immigration policies without Congress changing laws. Another case involving whether migrants can claim asylum if they crossed the border illegally was in court Wednesday in San Francisco. A judge has temporarily stopped that November policy change, and Wednesday's proceedings were to determine whether that stay should be continued. The administration has asked the Supreme Court to allow that asylum policy to go forward.

Trump administration officials say the asylum process is being exploited by immigrants who are counting on passing the initial credible-fear screening and being released into the country. Only about 9 percent of all people who initially claim asylum are granted it, and tens of thousands of families from Central America are coming to the U.S. every month.

The immigration policy change had an immediate impact.

Immigration lawyers say people whom they expected would pass credible-fear screenings began to fail them, and lawyers say immigration judges are signing off on more denials during appeals, effectively ending what could have been a yearslong asylum process before it began.

But Trump officials also say the number of people claiming credible fear has risen dramatically.

Asylum can be granted to people who were persecuted in their home country or could be persecuted if forced to return. Thousands of people seek asylum each month at U.S. Customs and Border Protection stations along the southwest border.

The American Civil Liberties Union sued the government over the June 11 change on behalf of 12 parents and children who were wrongly found not to have a credible fear of return. Sullivan's ruling impacts thousands of cases where immigrants are in expedited removal proceedings.

Among the plaintiffs was a woman identified only by a pseudonym, Grace. The ACLU said Grace's partner beat her and her children, and sexually assaulted her and her daughter. Once, the ACLU says, her daughter suffered a miscarriage after he attacked her. The lawsuit says police did not act when she contacted them. The lawsuit says Grace was found not to have a credible fear of persecution.

The judge also ordered the government to return any of the plaintiffs who may have been deported back to the U.S., and prevent further deportations.

"This ruling is a defeat for the Trump administration's all-out assault on the rights of asylum seekers. The government's attempt to obliterate asylum protections is unlawful and inconsistent with our country's longstanding commitment to provide protection to immigrants fleeing for their lives," said Jennifer Chang Newell, managing attorney of the ACLU's Immigrants' Rights Project, who argued the case.

More From KGAB