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

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.

A US judge in San Francisco Wednesday extended his decision blocking the Trump administration from enforcing a ban on asylum for any immigrants who illegally cross the U.S.-Mexico border.

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

US District Court Judge Emmet Sullivan declared that some of the guidance that then-Attorney General Jeff Sessions issued this year 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. A US judge in San Francisco Wednesday extended his decision blocking the Trump administration from enforcing a ban on asylum for any immigrants who illegally cross the U.S.-Mexico border.

Judge Jon Tigar ruled in favor of keeping the ban on hold pending the outcome of a lawsuit challenging it. The case could take months to resolve. He had previously blocked the ban for 30 days.

The ban conflicts with an immigration law that says immigrants can apply for asylum regardless of how they enter the U.S., Tigar said.

The administration has asked the Supreme Court to allow that asylum policy to go forward.

Responding to Sullivan's ruling, a Justice Department spokesman, Steven Stafford, said Sessions' guidance had followed the requirements for asylum under U.S. law.

"We are reviewing our options with regard to this ruling, and we will continue to restore the rule of law in our immigration system," he said.

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.

The judge who issued the ruling attracted attention one day earlier for his public excoriation of former Trump administration adviser Michael Flynn, saying he felt disgusted and disdainful of Flynn's crimes. He allowed Flynn to postpone his sentencing so Flynn could continue cooperating with investigators and get credit that could allow him to avoid prison.

___

Associated Press writer Sudhin Thanawala in San Francisco contributed to this report.