U.S. Defense Intelligence Agency (DIA) counterterrorism analyst Henry Kyle Frese pleaded guilty on Thursday to leaking information to the press in 2018 and 2019.

According to a DIA press release, Frese faces up to 10 years in prison for leaking sensitive military information from five separate classified documents. Frese was employed by the DIA as either a contractor or employee from January 2017 to October 2019.

Over the course of two years, Frese illegally obtained and distributed classified military intelligence information to two journalists. But court filings state that the information was published in eight articles written by the same journalist — Amanda Macias, a national security reporter for CNBC, and Frese’s girlfriend at the time.

Court documents claim Macias later asked Frese via Twitter direct messages whether he would share the information with another journalist whose identity has not yet been disclosed. Frese then “searched on a classified United States government computer system” to obtain the information requested.

“Frese violated the trust placed in him by the American people when he disclosed sensitive national security information for personal gain,” Assistant Attorney-General for National Security John Demers said. “He alerted our country’s adversaries to sensitive national defense information, putting the nation’s security at risk.”

In a statement released by the Department of Justice, Virginia District Attorney G. Zachary Terwilliger said the case should “serve as a clear reminder” that “unilaterally disclosing such information for personal gain, or that of others, is not selfless or heroic, it is criminal.”

Frese was arrested in October. He pleaded guilty to two charges of “willful transmission of national defense information” on Thursday. He will be sentenced in federal court on June 18.