A federal judge in Washington, D.C., on Wednesday ruled against the Administrative Office of the U.S. Courts' code banning staff from participating in political speech, finding the office went too far in implementing the prohibitions.

The AO adopted the restrictions in 2018, which included bans on staff donating to candidates and belonging to political parties. Director James Duff argued they were necessary in part to maintain the independence of the judiciary, but two staffers alleged it violated their First Amendment rights in a lawsuit brought forward by the American Civil Liberties Union.

U.S. District Judge Christopher "Casey" Cooper issued a preliminary injunction in 2019, temporarily halting all but two of the restrictions from going into effect. On Wednesday, he made that injunction permanent and ruled the code only applied to top AO officials, including Duff.