Updated

A federal judge on Wednesday took the extraordinary step of ordering that asylum seekers who sued after their deportation be returned to the U.S. to have their claims heard anew, ruling against the Trump administration's revised asylum policies.

The ruling from U.S. District Judge Emmet Sullivan in Washington came a day after the same judge presided over a contentious sentencing hearing for former national security adviser Michael Flynn -- in which he questioned whether the ex-White House official committed “treason” and accused him of selling out the United States to foreign interests. He later delayed Flynn’s sentencing until 2019, as part of Special Counsel Robert Mueller’s Russia investigation.

In his sweeping ruling Wednesday against the Trump administration's immigration policies, Sullivan said recent changes violated federal law.

WHO IS EMMET SULLIVAN?

“The Court holds that it has jurisdiction to hear plaintiffs’ challenges to the credible fear policies, that it has the authority to order the injunctive relief, and that, with the exception of two policies, the new credible fear policies are arbitrary, capricious, and in violation of the immigration laws,” Sullivan concluded.

Sullivan went a big step further by ordering that “the government to return to the United States the plaintiffs who were unlawfully deported and to provide them with new credible fear determinations consistent with the immigration laws.”

In addition to returning asylum seekers to the U.S., Sullivan blocked the Trump administration policies from being further applied.

In response to the decision, Justice Department spokesman Steven Stafford said: “Under the laws passed by Congress, asylum is only for those who have a legitimate fear of persecution on the basis of their race, nationality, religion, political opinion, or membership in a particular social group.  Attorney General Sessions’ ruling in Matter of A-B- was about following that requirement. We are reviewing our options with regard to this ruling, and we will continue to restore the rule of law in our immigration system.”

It marked another legal blow for Trump's efforts to harden immigration policies without Congress changing laws. A U.S. 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 previously had 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.

The revised asylum rules were announced by then-Attorney General Jeff Sessions over the summer. The new policy made it harder for asylum seekers to make “credible fear claims” of domestic or gang-related violence back home, in expedited removal immigration proceedings.

"The vast majority of the current asylum claims are not valid," Sessions said in June.

Federal officials said they made changes to prevent fraud within the asylum system, though the policy also enabled speedy deportations that were later challenged.

A group of asylum seekers, backed by the American Civil Liberties Union, sued the Trump administration in federal court.

“This ruling is a defeat for the Trump administration’s all-out assault on the rights of asylum seekers,” Jennifer Chang Newell, managing attorney of the ACLU’s Immigrants’ Rights Project, who argued the case, said in a statement Wednesday. “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.”

The ACLU represented women who had endured “extensive persecution in the form of sexual and physical violence.”

“Judge Sullivan’s decision ensures that our asylum system remains open to refugees at our border, including those fleeing domestic violence and gang violence,” Eunice Lee, co-legal director of the Center for Gender & Refugee Studies, said in a statement. “These individuals raise legitimate claims under U.S. and international law, and have an unequivocal right to seek asylum. I am thrilled that the court’s order upholds that right.”

The Associated Press contributed to this report.