A District judge has ruled that a Trump appointee overstepped his authority when he fired the board of an agency that helps dissidents and journalists in repressive countries and sought to replace it with his own slate of directors, including himself.

Shortly after taking over as chief executive of the federal agency that supervises the Voice of America, Radio Free Europe and other government-funded media operations in June, Michael Pack began a sweeping overhaul of the six organizations, firing five of their directors; two others resigned in anticipation of his cuts.

But the board of the Open Technology Fund, which Pack dismissed along with its director, rejected his order, arguing that he didn’t have the authority to replace them, and at one point, it blocked Pack’s chosen slate of directors and his new chief executive designee from taking over its offices in the District.

The District’s attorney general, which oversees nonprofits in the city, sued on the agency’s behalf. And on Wednesday, Superior Court Judge Shana Frost Matini agreed that Pack was not authorized by the fund’s bylaws to replace its leadership and that the board Pack has been seeking to replace is the “valid” one at the agency.

A spokesperson for Pack did not respond to a request for comment.

Although the ruling affirms the existing board’s authority, it probably has little application for Voice of America and other entities under control of Pack’s U.S. Agency for Global Media because they are chartered under a different set of regulations that gives USAGM greater oversight.

Pack has frozen about half of Open Technology Fund’s remaining grant funds for 2020, said Laura Cunningham, the agency’s acting chief executive and president. Along with unpaid grants from the prior fiscal year, USAGM has held back about $20 million, she said, prompting the suspension of about 80 percent of its ongoing projects.

“It seems CEO Pack has a very specific vision about a handful of projects he wants supported,” she said, adding that the technology fund “does not want to fund his preferred technologies.”

Among those Pack has sought to name to Open Technology Fund’s board are himself, his chief of staff and several Trump appointees from other federal agencies. His slate also includes Jonathan Alexandre, senior counsel for governmental affairs at Liberty Counsel Action, an organization affiliated with Liberty Counsel, which the Southern Poverty Law Center calls “a legal organization advocating for anti-LGBT discrimination under the guise of religious liberty.”

Pack’s confirmation by the Senate followed more than two years of controversy over his nomination by Trump. He finally gained approval after the White House launched an extraordinary attack on Voice of America, alleging it was promoting propaganda by China, Iran and other authoritarian regimes.

Pack has joined in on the criticism, suggesting without evidence that the news service has harbored foreign spies. Last week, his agency denounced Voice of America for publishing “substandard journalism,” though it cited no specific examples.

Separately, five USAGM officials suspended by Pack sued the agency last week, alleging that he and senior managers have violated the statutory “firewall” that is intended to protect Voice of America’s reporting, and that of other federally funded broadcasters, from political interference. The lawsuit, filed in U.S. District Court in Washington, alleges that Pack has meddled in Voice of America to create coverage more favorable to Trump.

USAGM has said the lawsuit is without merit.

Correction: A previous version of this story said the Southern Poverty Law Center referred to Liberty Counsel Action as an organization that has advocated “for anti-LGBT discrimination under the guise of religious liberty.” The SPLC comment actually referred to a related group, Liberty Counsel.