WASHINGTON (Reuters) - A retired U.S. Marine Corps general who last served as vice chairman of the Joint Chiefs of Staff pleaded guilty on Monday in a federal court to making false statements to the FBI during an investigation into leaks of classified information.

Retired U.S. General James Cartwright, then vice chairman of the Joint Chiefs of Staff, testifies before a Senate Armed Services Committee hearing on Capitol Hill in Washington, U.S., December 3, 2010. REUTERS/Hyungwon Kang/Files

Four-star General James Cartwright was questioned by the Federal Bureau of Investigation in 2012 over a book written by New York Times reporter David Sanger, which exposed a malicious computer software program known as “Stuxnet” designed to disrupt Iran’s nuclear program.

Cartwright also in 2012 confirmed classified information about an unnamed country to Daniel Klaidman, then a reporter for Newsweek, according to his plea agreement.

He retired from the U.S. Marine Corps in September 2011, four months before he began providing information to Sanger, the plea agreement said.

“I knew I was not the source of the story, and I didn’t want to be blamed for the leak,” said Cartwright of his effort to mislead FBI agents in a statement released after he pleaded guilty on Monday. “My only goal in talking to the reporters was to protect American interests and lives.”

Cartwright’s guilty plea was for his false statements to FBI agents, not for speaking to the reporters, said Cartwright’s attorney Gregory Craig, of Skadden Arps Slate Meagher & Flom, in a separate statement: “His effort to prevent publication of information that might harm American lives of national security does not constitute a violation of any law.”

Federal prosecutors declined to comment on the hearing. A false statements conviction carries a maximum prison sentence of five years, but prosecutors and Cartwright’s attorneys agreed his offense merited a sentence ranging from zero to six months.

Reuters and several other news outlets have previously reported that Stuxnet was developed jointly by U.S. and Israeli forces. Both the U.S. and Israel have never publicly admitted responsibility for Stuxnet.

Stuxnet was a sophisticated computer virus deployed covertly in 2009 and 2010 to sabotage Iran’s nuclear program. The worm, parts of which surfaced publicly in 2010 due to a programing error that allowed it to spread across the open internet, is believed to have destroyed a thousand or more centrifuges that were enriching uranium.

Cartwright has long been the target of a Justice Department probe investigating the source of leaks about Stuxnet to the New York Times.

U.S. District Judge Richard Leon on Monday tentatively scheduled Cartwright’s sentencing for Jan. 17, 2017, and acknowledged that part of the sentencing might be closed to allow for discussion of classified information.