Former government intelligence analyst Daniel Hale was arrested and charged by a federal court on Thursday over the leak of classified documents to an unnamed journalist.

The 31-year-old from Tennessee is alleged to have leaked at least 17 secret government documents to the media in 2014 when working as a political geography analyst at the National Geospatial-Intelligence Agency.

Hale faces five charges in total, three under the Espionage Act. He faces a maximum of 50 years in jail.

The unsealed Justice Department indictment document was quickly picked apart online and the journalist who received the classified material was swiftly identified as the Intercept’s Jeremy Scahill. The documents leaked appear to have been published by Scahill as part of the outlet’s Drone Papers series.

Prosecutors say that Hale’s relationship with the journalist began in 2013, while he was enlisted in the Air Force and assigned to the National Security Agency (NSA). According to events detailed in the indictment, Hale met with the reporter first time on April 29, 2013, at a promotion event for Scahill’s book Dirty Wars.

The former analyst texted a friend after the meeting saying that the reporter wanted him to talk “about working with drones.” On June 8, Hale appeared on-stage with Scahill at another book-related public event, footage of which is still online.

In the months that followed the pair continued to stay in touch by phone, text, and encrypted messaging app Jabber. Then, in February 2014, Hale is alleged to have printed 36 documents from his work computer—providing 17 of them to Scahill and the Intercept.

In a statement published on its website, the Intercept’s editor-in-chief Betsy Reed wrote that the outlet “does not comment on matters relating to the identity of anonymous sources.”

James Risen, director of First Look Media’s Press Freedom Defense Fund, issued a public statement blasting Hale’s indictment as “an abuse of the Espionage Act to criminalize the process of reporting” by “targeting the very people who are working the hardest to hold the government accountable for abuses and to protect our democracy.”

Interestingly, a portion of the indictment focuses on Hale’s use of anonymity tools including the Tails operating system and Tor. Prosecutors note that these tools are recommended to potential whistleblowers by the publication Hale is alleged to have leaked to.

“These cases are criminalizing both whistleblowing and journalistic best practices like using encryption and protecting source anonymity,” Hale’s attorney Jesselyn Radack told the Daily Dot.

“This is a toxic trend, the consequences of which extend well beyond the Intercept,” she continued. “It’s easier for the Justice Department to go after controversial people like Chelsea Manning and Julian Assange, or an adversarial outlet like the Intercept. But it creates awful precedent to go after mainstream media and chills public servants from exposing government illegality.”

READ MORE: