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

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, in a 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. Prosecutors and Cartwright's attorneys agreed his offense merited a sentence ranging from zero to six months.

Reuters and several other news outlets previously reported that Stuxnet was developed jointly by U.S. and Israeli forces. Both the United States 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 spread publicly across the internet in 2010 due a programming error, 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.

(Reporting by Julia Edwards and Dustin Volz)