Daniel Hale, 33, pleaded guilty in March to violating the Espionage Act by leaking top-secret documents to a reporter.
Hale, who was sentenced in U.S. District Court in Alexandria, said his guilt over participating in lethal drone strikes in Afghanistan led him to leak government secrets.
In an 11-page handwritten letter from jail, Hale described his regret and horror as he saw gruesome videos of Afghans killed in part because his work helped track them down.
He said his conscience compelled him to disclose details about the program to an investigative reporter. The documents showed, among other things, that the drone program was not as precise as the government claimed in terms of avoiding civilian deaths.
"Not a day goes by that I don't question the justification for my actions," Hale wrote.
Prosecutors said Hale began communicating with a reporter while enlisted in the U.S. Air Force and assigned to the National Security Agency. After leaving the Air Force and while working as a cleared defense contractor at the National Geospatial-Intelligence Agency, Hale gave an investigative reporter classified documents which were later published by the reporter’s outlet.
In court papers, Hale's lawyers argued that his altruistic motives, and the fact that the government hasn't shown any actual harm occurred from the leaks, should be considered for a light sentence.
"He committed the offense to bring attention to what he believed to be immoral government conduct committed under the cloak of secrecy and contrary to public statements of then-President Obama regarding the alleged precision of the United States military's drone program," defense attorneys Todd Richman and Cadence Mertz wrote.
Prosecutors, though, said the classified documents' disclosure had the potential to cause serious damage. In sentencing papers, prosecutors Gordon Kromberg and Alexander Berrang wrote that leaked documents were found in an internet compilation of material designed to help ISIS members avoid detection.
"(A)s a result of Hale's actions, the most vicious terrorists in the world obtained documents classified by the United States as "Secret" and "Top Secret" — and thought that such documents were valuable enough to disseminate to their own followers in their own manuals," Kromberg and Berrang wrote.
The Associated Press contributed to this report.