A former government intelligence analyst has been charged in Alexandria federal court with leaking classified information on drone warfare to a reporter.

Daniel Hale, 31, of Nashville was arrested in Tennessee Thursday and is set to appear in Alexandria court on May 17. He worked for both the National Security Agency and as a contractor for the National Geospatial-Intelligence Agency and had a top-secret security clearance.

He is charged with five crimes related to the disclosure and could face a maximum of 50 years in prison.

The reporter Hale allegedly shared information with is not named, but the description matches Jeremy Scahill, a founding editor of the Intercept.

“The allegations against Hale are allegations of whistleblowing,” said his attorney, Jesselyn Radack. “The Intercept’s reporting on the U.S. government’s secretive drone assassination program shed much needed light on a lethal program in dire need of more oversight.”

According to the indictment, Hale approached Scahill at a Washington bookstore on April 29, 2013. Scahill was promoting a book on covert American operations abroad.

Federal court in Alexandria. (Jacquelyn Martin/AP)

He encouraged Hale to talk about “working with drones,” the analyst texted a friend, the indictment said.

They remained in contact, according to the indictment, using the encrypted app Jabber to communicate. Starting in February 2014, according to the indictment, Hale printed 36 documents from his work computer, 17 of which were later published in whole or in part by the Intercept and in a book by Scahill and other reporters, according to the indictment. Eleven of the shared documents were classified.

In October 2015, the Intercept published “The Drone Papers,” a series by Scahill and others based on classified documents related to drone warfare. Scahill published “The Assassination Complex: Inside the Government’s Secret Drone Warfare Program” in April 2016.

When he met Scahill, according to the indictment, Hale had just left the Air Force after four years, where he was trained in language and intelligence analysis and assigned to work at the NSA. He was sent to Bagram Airfield in Afghanistan, where he worked with a Department of Defense Joint Special Operations Task Force identifying targets. He then went to work for a defense contractor named Leidos, doing analysis for the NGA.

A Leidos official said in a statement that the company has “zero tolerance” for behavior that might compromise the security of client data and that it is cooperating in the investigation of Hale.

Hale appeared under his first name in a documentary released in 2016 called “National Bird,” in which he shares the search warrants the FBI used to raid his home in August 2014, when he was told he was under investigation for espionage.

“I’m probably going to get indicted and I’m probably going to get charged with a crime, and there’s probably a real chance that I’m going to have to fight to stay out of prison, ” he says.

He says in the movie he joined the Air Force despite ideological disagreements with the military “out of desperation, because I was homeless.” He worked as a signals analyst identifying high-value drone targets. “The most disturbing thing . . . is the uncertainty if anyone I was involved in kill or capture was a civilian or not,” he says. “There’s no way of knowing.”

In a statement posted on the Intercept site, Betsy Reed, its editor in chief, wrote the outlet “does not comment on matters relating to the identity of anonymous sources.”

The statement said the documents described in the indictment “detailed a secret, unaccountable process for targeting and killing people around the world, including U.S. citizens, through drone strikes. They are of vital public importance, and activity related to their disclosure is protected by the First Amendment.”

At the end of the documentary “Citizenfour,” Intercept founder Glenn Greenwald tells NSA leaker Edward Snowden the Intercept has a new source of confidential information on the U.S. drone program.

“That’s really dangerous on the source’s side,” Snowden said, looking at some of the revelations. “That person is in­cred­ibly bold . . . Do they know how to take care of themselves?”

Greenwald reassures him “they’re very careful.”

Snowden himself was charged with espionage in 2013 for leaking classified information to Greenwald and others but has been living under asylum in Russia.

Two other people have been charged with leaking information to the website — former Air Force linguist Reality Winner and former FBI agent Terry J. Albury.