MANHATTAN (CN) – A federal judge refused Tuesday to dismiss a literary advocacy group’s First Amendment claims over President Donald Trump’s threats to retaliate against critical media coverage by revoking White House press credentials.

PEN America’s October 2018 federal complaint filed in the Manhattan sought a judgment that Trump violated the First Amendment when he used the power of the federal government “with intent to retaliate against or otherwise constrain speech critical of him or his administration.”

“These are classic First Amendment injuries,” U.S. District Judge Lorna Schofield wrote in a 24-page opinion Tuesday, advancing the literary organization’s surviving claims for declaratory relief.

“Plaintiff has constitutional standing to pursue First Amendment claims against defendant’s practice of selectively barring access to the White House press corps, including by revoking or threatening to revoke press credentials, due to hostility to the reporters’ speech and revoking or threatening to revoke the security clearances of former government officials whose commentary he dislikes,” the ruling states.

Schofield, an Obama appointee, was persuaded by PEN America’s claims that Trump’s barring of CNN reporter Jim Acosta from the White House did in fact chill journalists’ free speech.

During a press conference on Nov. 7, 2018, the day after Democrats won big in the midterm elections, Trump took umbrage with Acosta’s questioning and had the CNN reporter’s press credentials stripped. The president also directed his press secretary to warn other reporters that they would face similar consequences as Acosta.

“Defendant’s retaliatory actions and threats have injured Mr. Acosta in two ways: Mr. Acosta’s own speech has been chilled, and Mr. Acosta’s right to receive the speech of his press corps colleagues has been impeded, because their speech has been chilled,” Schofield wrote.

The judge similarly found credible PEN America’s claims related to Trump’s announcement that he would review the security clearances of six former government officials after they had spoken critically about him in media appearances.

“Defendant undoubtedly has authority to revoke the clearances,” Schofield wrote. “Defendant has plausibly threatened that, should the officials continue to provide critical commentary in the press, their security clearances would be jeopardized and revoked.”

Schofield ruled that PEN America, however, does not have standing on its claims challenging Trump’s alleged threats to revoke broadcast licenses, an executive order on postal rates, the president’s effort to block the AT&T-Time Warner merger or regulatory threats against internet companies.

“Plaintiff does not have associational standing for the other allegations…because the complaint does not identify any PEN America member who has standing to bring these claims,” Schofield wrote.

The judge also dismissed counts that sought injunctions to block Trump from directing government agencies to retaliate against journalists for their speech.

“Issuing an injunction to the president would impede his discretionary authority in these realms, and more generally, risk improper judicial encroachment on the executive branch,” Schofield wrote. “The remaining claims will proceed as claims for declaratory relief only, and the application for injunctive relief is denied.”

Suzanne Nossel, CEO of PEN America, applauded the judge’s ruling.

“It’s hard to think of a moment in American history in which unvarnished, accurate news reporting has mattered more than it does now,” Nossel said in statement. “This decision is a victory not just for PEN America and our own writers, but also for the journalists and media outlets doing the vital, risky work of keeping us all informed. But above all, it is a win for all individuals who depend on a free press to dig out the facts and hold leadership accountable without fear of reprisal.”

Kristy Paker, counsel for Protect Democracy, one of the organizations representing PEN America in the lawsuit, also commended the decision Tuesday.

“The president can take to Twitter to complain all he wants about media coverage, but he abuses his power and violates the Constitution when he uses his office to punish members of the media,” Parker said in a statement. “This is not North Korea—we don’t allow our politicians to control what the press says or punish the media for coverage that Dear Leader doesn’t like. Just the opposite—we rely on the media to hold the powerful accountable to the people.”

The suspension of Acosta’s White House press credentials triggered a separate legal battle in Washington. U.S. District Judge Timothy Kelly, a Trump appointee, ruled in favor of Acosta and restored the CNN reporter’s press credentials.