Retired Marine Gen. James Cartwright, once considered one of President Obama’s favorite generals, has been charged with lying to federal investigators about revealing classified information to two journalists.

Cartwright “falsely told investigators that he was not the source” for sensitive information that appeared in a book by New York Times reporter David Sanger, according to charging documents unsealed by prosecutors.

Sanger has written about U.S. cyber attacks on Iranian nuclear facilities and the use of the Stuxnet computer virus to disable centrifuges the Iranians were using to enrich uranium in his book “Confront and Conceal.”

Cartwright in expected to plead guilty to one count of knowingly making a false statement to federal investigators.

The document also states that Cartwright “falsely told investigators that he never discussed Country 1 with Daniel Klaidman.”

But Cartwright “confirmed certain classified information relating to Country 1 in an email he sent to Daniel Klaidman,” the document states.

It does not identify “Country 1” or specify when Cartwright allegedly sent the email to Klaidman, a reporter and the author of “Kill or Capture: The War On Terror and the Soul of the Obama Presidency.”

Cartwright, 67, was vice chairman of the Joint Chiefs of Staff from 2007 to 2011. An expert of cyber warfare and nuclear weapons, Cartwright was considered a close adviser on military matters to President Barack Obama