The Justice Department filed 17 charges against WikiLeaks co-founder Julian Assange on Thursday, deploying the controversial Espionage Act as a cudgel against First Amendment protections and press freedom. It’s the first time the U.S. government has used the Espionage Act to prosecute a publisher, according to the Committee to Protect Journalists.

Democratic presidential candidates Bernie Sanders and Elizabeth Warren, along with Sen. Ron Wyden, who all have been outspoken on civil liberties issues, slammed the indictment.

“Let me be clear: it is a disturbing attack on the First Amendment for the Trump administration to decide who is or is not a reporter for the purposes of a criminal prosecution,” Sanders wrote in a tweet Friday afternoon after The Intercept contacted his office for comment. “Donald Trump must obey the Constitution, which protects the publication of news about our government.”

Warren distanced herself from Assange but condemned the Justice Department’s move to curtail press freedom. “Assange is a bad actor who has harmed U.S. national security — and he should be held accountable,” Warren said in a statement. “But Trump should not be using this case as a pretext to wage war on the First Amendment and go after the free press who hold the powerful accountable everyday.”

“This is not about Julian Assange,” Wyden said in a statement. “This is about the use of the Espionage Act to charge a recipient and publisher of classified information. I am extremely concerned about the precedent this may set and potential dangers to the work of journalists and the First Amendment.”

The Justice Department has alleged that Assange violated the Espionage Act by publishing classified documents in 2010, and that he “encouraged sources to circumvent legal safeguards on information.” Assange, along with WikiLeaks, the indictment says, “repeatedly sought, obtained, and disseminated information that the United States classified due to the serious risk that unauthorized disclosure could harm [U.S.] national security.” Those documents revealed the U.S. military killing unarmed civilians and Reuters staff, and included activity reports from Afghanistan and Iraq, along with briefings on detainees being held at Guantánamo Bay.

Information included in those documents were reported by outlets including the New York Times and The Guardian; the Obama administration had always been reluctant to indict Assange due to what it called “the New York Times problem.” There was no way to say that Assange’s action was criminal without also saying that much of what the Times and other mainstream outlets do is also against the law.

Indeed, the documents are still officially classified, meaning that anybody who discusses them, even in the context of Assange’s indictment, could themselves be committing a crime. Transparency advocates have said that the executive branch has been classifying far too much basic information — the soup of the day at the CIA’s cafeteria, for instance, could be classified. If the government effectively criminalizes reporting on classified information, that gives the government the unilateral authority to determine what can and cannot be published, simply by deploying its opaque and unreviewable classification scheme.

Assange is currently serving a jail sentence in the United Kingdom for jumping bail to seek refuge in London’s Ecuadorian Embassy. He had long said he was concerned that the United States would unveil precisely the kind of indictment it did on Thursday and seek to extradite him. He was arrested in April after Ecuador withdrew his asylum for what Ecuadorian President Lenín Moreno described as “repeated violations of international conventions and daily-life protocols.” That arrest was also made in part on behalf of the U.S. regarding an extradition request from 2010, charging Assange with conspiring with Chelsea Manning to leak classified documents. Assange was until recently also facing two separate charges from 2010 of rape and molestation in Sweden. Sweden dropped one case in 2015 after the statute of limitations expired, and the other in 2017 — but is now considering reopening the latter case.