A federal judge has struck down a series of Trump administration immigration policies that blocked people from 39 countries from receiving decisions on applications for asylum, work permits, green cards and citizenship, according to Antigua News Room.

Chief U.S. District Judge John McConnell, based in Providence, Rhode Island, ruled Friday that the U.S. Citizenship and Immigration Services had left immigrants from dozens of African, Asian, Latin American and Middle Eastern countries in what he described as "indeterminate legal limbo."

McConnell, appointed by former Democratic President Barack Obama, found that the affected immigrants had followed all legal processes established by Congress and USCIS regulations, yet had been "stuck waiting, for months on end, for benefit requests that USCIS refuses to adjudicate."

The judge ruled that the agency adopted the policies without proper statutory and regulatory authority, and on the basis of "anti-immigrant sentiments that it is forbidden from letting influence its decision-making."

"USCIS's hold on adjudications cannot be attributed to anything that these individuals did wrong; rather, it arises solely by the happenstance of their birth," McConnell wrote.

The ruling delivered a victory to a coalition of immigrant service organizations and labor unions that filed suit in March challenging the USCIS policies. USCIS operates under the U.S. Department of Homeland Security.

Skye Perryman, head of the liberal legal group Democracy Forward, which represented the plaintiffs, welcomed the decision. "This ruling reaffirms a basic principle: the federal government cannot shut down lawful immigration pathways or discriminate against people based on where they come from," she said. DHS did not immediately respond to a request for comment.

As reported by Antigua News Room, USCIS adopted the contested policies as part of a broader immigration crackdown that followed the November shooting of two National Guard members in Washington, D.C. Prosecutors say the attack was carried out by an Afghan immigrant.

In the wake of that incident, Trump vowed on social media to "permanently pause migration from all Third World Countries" to allow the immigration system to recover. His administration subsequently expanded its travel ban to cover 39 nations, with countries including Afghanistan, Iran, Haiti, Somalia, Venezuela and Syria subject to full restrictions. The administration cited vetting and national security concerns to justify the measures.

The USCIS processing freeze placed holds on immigration benefit applications from nationals of all 39 countries, which McConnell said "placed the lives of countless individuals on hold—solely by virtue of their countries of birth."

In his ruling, the judge was unsparing in his assessment of the agency's conduct. "The rule of law has to apply to everyone equally and, as evident here, USCIS has neither 'followed the law' nor 'done things the right way,'" he wrote, adding that the agency had "violated the very immigration laws that Congress has charged it with administering, as well as the administrative laws that govern the agency's actions."