Whatever you may think of Julian Assange (I’m not a big fan), indicting him under the Espionage Act—as the Justice Department did Thursday—is an ill-founded, ham-fisted move that endangers free speech for all Americans.

A month ago, Justice issued a single-count indictment against Assange, charging him with conspiracy to break into a computer containing classified information, a crime punishable with up to five years in prison. It was a clever bit of business, nabbing the founder of WikiLeaks, who has done some serious damage to U.S. security, for one of his lesser offenses in a way that addressed the method by which he tried to obtain some information—not his right to receive or publish it.

Now we see this was just a ploy. Thursday’s 18-count indictment goes after him explicitly for receiving and publishing classified materials. By the indictment’s logic, hundreds of journalists could be arrested for simply doing their jobs.

Assange is not a journalist by most people’s understanding of the word. But what he’s indicted for here is legally indistinguishable from what lots of journalists do. In the indictment’s words, he “repeatedly sought, obtained, and disseminated information that the United States classified” as secret. The authors of many front-page news stories and best-selling books are guilty of the same.

The Obama administration stopped short of indicting Assange precisely because it couldn’t be done without, in effect, criminalizing standard journalistic practices. Trump’s Justice Department is now doing just that, openly, blatantly, without blush or euphemism.

For this reason, the charges are unlikely to stick—but there’s a chance they will.

We almost went down this road, and not so long ago. In the 2006 case of The United States vs. Lawrence Anthony Franklin, Steven J. Rosen, Keith Weissman, prosecutors in Alexandria, Virginia (the same district that is now charging Assange) issued a five-count indictment under federal espionage statutes that were passed in 1917, forbidding the “communication of national defense information to persons not entitled to receive it.”

Franklin was a Pentagon official who told Rosen and Weissman, policy analysts for the American-Israel Public Affairs Committee, about classified information. His offense, though hardly unusual in Washington and rarely prosecuted under any charges, much less under the Espionage Act, was at least straightforward—he violated his oath to keep secrets secret. The truly shocking thing about the case was that Rosen and Weissman were also indicted for simply receiving the information.

The section of their indictment, breathlessly titled “Ways and Means of the Conspiracy,” found that Rosen and Weissman

would cultivate relations with Franklin and others and would use their contacts within the U.S. government and elsewhere to gather sensitive information, including classified information, relating to national defense, for subsequent unlawful communication, delivery and transmission to persons not entitled to receive it.

Again, this is what journalists do all the time. They receive information from insiders, write it up in a story, and send the story to editors, who publish it in newspapers, magazines, wire services, or on websites, all of which are seen by readers who have also not been officially authorized to view that material. Had the Franklin indictment passed muster, and had its logic been extended, people who simply read the subsequent articles (“persons not entitled to receive it”) could have been indicted under the act.

The presiding U.S. district court judge, T.S. Ellis III, made the same point, noting that the law “applies to academics, lawyers, journalists, professors, whatever.” Still, at the start of the case, Ellis seemed inclined to accept the logic. This is what the law says, he told the defense attorneys. It’s his job to interpret the law, not change it.

And in fact, the law—formally known as 18 U.S. Code, Section 793, “Gathering, Transmitting, or Losing Defense Information”—is a grotesque piece of work. The list of activities that could get millions of Americans nabbed by a vigilant enforcer of the statute is jaw-dropping. Congress really does need to repeal it and replace it with a bill that addresses real espionage.

It was for that reason that, eventually, Ellis wound up throwing the book at Franklin, the leaker—but letting Rosen and Weissman, the receivers of the leak, go free. He agreed with their lawyers that the statute is so frequently violated, yet so rarely enforced—the receiver clause, in particular, has almost never been enforced—that it would be capricious to prosecute them for this dubious offense.

Whether Assange will get the same break is hard to say, but certainly he should. His single-count indictment last month was a different matter: It accused him of helping a source with a Top Secret clearance—Chelsea Manning, then an Army private—crack the code of a computer containing classified information. This sort of activity is not protected by the First Amendment, and any journalist who gets caught going that far in pursuit of a scoop would also face jail time.

The Obama administration stopped short of indicting Assange precisely because it couldn’t be done without, in effect, criminalizing standard journalistic practices.

However, Thursday’s indictment charges him with activities—under the same statute cited in Franklin, 18 U.S. Code, Section 793—that are protected by the First Amendment. In this sense, Assange is in the same boat as Rosen and Weissman, who were let off; he was receiving classified information, then transmitting it to others. Assange was more aggressive about getting the goods—but not much more so than some journalists (except, again, in the part about cracking a computer code).

The statute contains one caveat, specifying that in order for disclosures to be illegal, they must be made or received “with intent or reason to believe that the information is to be used to the injury of the United States, or to the advantage of any foreign nation.” But this is a very low bar. The key word is or. To be charged, a person doesn’t have to intend to hurt the U.S. or help other nations, but only to believe the information might be used to have that effect; and we’re talking about “any foreign nation,” not just adversaries.

If the judge hearing Assange’s case takes the same approach that Ellis took in Franklin, the charges will likely be dismissed. If somehow the case goes to the Supreme Court, even the conservative justices—who tend to take the First Amendment seriously—may well let him off, if in a reluctant tone.

However, it’s also possible that this case will never come to court. When Assange’s first indictment was issued in April, I speculated, only half-seriously, that the narrowness of the charge and relative lightness of its punishment might be a ploy—a way of persuading the British to extradite him to the United States, after which the Justice Department would slam him with much heavier charges.

Thursday’s indictment surprises me in two ways. First, the Justice Department seems to have done just that: The new document is labeled a “superseding indictment” to the earlier file, suggesting that prosecutors had it in their pockets all along.

The second, bigger surprise, though, is that they announced and published the indictment before the extradition. Assange is still in Britain; his lawyers are appealing the request for extradition on several grounds—and the new indictment will certainly be added to the list. Violating Section 793 is punishable by up to 10 years. Assange is charged with 18 counts. That means he could face a sentence of 180 years—which British officials would likely regard as excessive. They are also likely to view the entire indictment as political—and are known to be dismissive of extraditions rooted more in political persecutions than proper adjudication.

Assange may be free to publish leaks again. And given the way the U.S. government is going after him, it deserves the wrath he delivers.