Retired Marine Gen. James Cartwright arriving at U.S. District Court in Washington on Oct. 17 for his guilty plea. (Pablo Martinez Monsivais/AP)

U.S. prosecutors are asking for a two-year prison sentence for a retired four-star Marine Corps general who served as the nation’s second-ranking military officer and who pleaded guilty in October to a felony count of lying to the FBI in a classified leak investigation.

James E. “Hoss” Cartwright, who was vice chairman of the Joint Chiefs of Staff before he retired in 2011, admitted to falsely telling investigators he did not confirm classified information to reporters writing about the Stuxnet computer worm and a covert U.S.-Israeli cyberattack on Iran’s nuclear program.

[Leak investigation stalls amid fears of confirming U.S.-Israel operation]

In the government’s sentencing request Tuesday to U.S. District Judge Richard J. Leon of Washington, prosecutor Leo J. Wise cited the need for deterrence.

“This was not a mistake or an error in judgment,” wrote Wise, who handled the case with U.S. Attorney Rod Rosenstein of Maryland at the request of then-Attorney General Eric H. Holder Jr. Those “entrusted with highly sensitive classified information . . . must understand that disclosing such information to persons not authorized to receive it has severe consequences,” Wise wrote.

Cartwright, 67, requested probation, and included letters seeking to help him avoid prison from two journalists whose interviews formed the basis of charges, from the former executive editor of The Washington Post, and from a bipartisan group of current and former senior government officials, members of Congress and military leaders.

The false-statements charge against Cartwright carries a maximum prison term of five years. Cartwright has also filed a pardon request with the Justice Department.

Cartwright was to be sentenced Jan. 17, but Leon last week postponed it to Jan. 31, after the Obama administration leaves office.

“In his contacts and communications with American journalists, General Cartwright was motivated by a desire to save secrets, not to disclose them,” wrote Cartwright’s attorneys, Gregory B. Craig and Clifford M. Sloan. “To add incarceration to the injury and humiliation that he has already suffered — would result in gross sentencing disparities” with other cases, they said.

In his letter to the sentencing court dated Dec. 16, New York Times reporter David E. Sanger said he already had a detailed understanding of events when, near the end of his reporting, he was advised by the White House to contact Cartwright for a June 2012 article and for his book, “Confront and Conceal,” which detailed the development of the U.S. cyber-campaign against Iran.

“Throughout the interview, [General Cartwright] consistently showed his concern that information damaging to U.S. interests not be made public,” Sanger wrote in his letter to the court. “. . . I have no doubt he was trying to act in the best interests of the United States.”

Cartwright’s attorneys also submitted a letter under seal from the other reporter who spoke with the retired general, Newsweek correspondent Daniel Klaidman, now with Yahoo.

As part of the larger set of supporting letters, Leonard Downie Jr., executive editor of The Washington Post from 1991 to 2008, wrote that it has been “common practice” for The Post, the New York Times and other responsible news outlets to consult with officials before publishing classified information obtained elsewhere, drawing a distinction from the WikiLeaks posting of 92,000 government and military documents in their raw form in 2010.

“Prosecuting officials for engaging in these discussions would greatly increase the risk of harm to national security by leaving journalists less knowledgeable about the potential risk in publishing the information they possess,” Downie wrote.

In a statement after his Oct. 17 plea, Cartwright denied being the source of the stories but accepted “full responsibility” for misleading the FBI in a voluntary interview on Nov. 2, 2012. His attorneys said he corrected his statements within days.

[Justice Department targets general in leak probe]

Prosecutors gave new details of the interview, saying Cartwright “apparently had an attack of conscience and blacked out” when confronted with email exchanges that indicated he had lied to investigators about not providing classified information to Klaidman, and when he said Sanger approached him through his office instead of directly. Cartwright was taken to a hospital where he stayed overnight.

Quoting an FBI investigative report, prosecutors wrote that after reading the emails, “Cartwright explained that he did not recall Klaidman asking about the matter, but then stated, ‘I think I divulged classified information.’ He additionally took off his glasses, started rubbing his eyes, and told interviewing agents, ‘you got me.’ ”

Scanning an exchange with Sanger, they added, “Cartwright was shaking, losing color in his face, and clearing his throat. Cartwright attempted to explain the email; however, his speech became slurred and he subsequently slumped over in this chair and lost consciousness.”

Cartwright’s sentencing is likely to stir controversy whatever his punishment.

First Amendment and whistleblower groups said the Obama administration was continuing a crackdown on disclosures of sensitive details that has led to more than twice as many prosecutions for leaking than during the tenure of all of his predecessors combined.

Other observers who work with government technical experts saw the felony prosecution of Cartwright — once known as Obama’s “favorite general” — as a rebuttal to critics who accused the administration of going easy on politically influential officials.

Those critics cited the 2015 misdemeanor plea deal for ex-CIA director and retired Army Gen. David H. Petraeus, who admitted mishandling classified information in materials he shared with his former mistress and biographer.

[How David Petraeus avoided felony charges and possible prison time]

Petraeus also had admitted lying to the FBI but was not charged with that offense. He was sentenced to two years of probation and a $100,000 fine.