A Seattle-based federal judge has ruled in favor of an immigrant rights group, allowing the organization to continue its work with immigrants.

The ruling by U.S. District Judge Richard Jones is a huge victory for the nonprofit Northwest Immigrant Rights Group, which was told by the Justice Department it could not give immigrants certain legal assistance if it was not prepared to formally represent them in court.

The NIRG received a cease-and-desist letter from the Justice Department last month. The group's executive director said this has caused them to begin turning away requests from three to four dozen immigrants a week.

The nonprofit then sued the Justice Department, citing violations of its rights to free speech, assembly and to petition the government. NIRG argued it lacks the resources to formally represent immigrants in court. Jones ruled in favor of the nonprofit on Wednesday.

"We are pleased by today's ruling from Judge Jones and pleased that he issued this temporary restraining order on a nationwide basis so other non-profit organizations can continue their work without the threat of being sanctioned," executive director Jorge Barón said in a statement.

Other groups were likely to be affected by the Justice Department's action, Barón and NIRG's lawyers had argued. In Jones's ruling, he also barred the Justice Department from sending such cease-and-desist letters to other nonprofits nationwide doing similar work with immigrants.

The Justice Department's Executive Office of Immigration Review had cited a rule it had adopted in 2008, designed to prevent attorney misconduct and "notario" fraud, which is when unauthorized lawyers offer immigration assistance and potentially take the client's money without providing any help.