A former CIA officer who was charged with repeatedly leaking classified information pleaded guilty in federal court Tuesday to a single charge of disclosing the identity of an undercover CIA operative.

Under the plea agreement, the former officer, John C. Kiriakou, will be sentenced to prison for up to 30 months. The agreement marks the end of a case that involved the spilling of secrets to reporters and that was part of the Obama administration’s unprecedented crackdown on leaks.

Kiriakou, 47, worked undercover for the CIA for years and took part in multiple operations that led to the capture of al-Qaeda suspects in Pakistan. But he is most widely known for being among the first former CIA officials to speak publicly about the agency’s secret interrogation program, describing in a 2007 television interview the use of waterboarding on al-Qaeda suspects.

As part of the agreement, the Justice Department dropped four other charges against Kiriakou, including allegations that he had illegally shared sensitive national defense information with reporters and had lied to the CIA’s publication review board about the contents of a memoir he published.

The case was one of six leaks-related prosecutions brought by the Justice Department since President Obama took office, more than all prior administrations combined. The plea deal comes just months after the department announced that it was closing its investigation of the deaths of prisoners in CIA custody without bringing a single charge.

Former CIA officer John Kiriakou, who told reporters he participated in the interrogation of terrorist Abu Zubaydah, has been charged with leaking classified secrets about CIA operatives and other information to reporters. (ABC News/AP)

Experts on leaks crimes said the government will probably regard a plea from Kiriakou as a significant victory given the collapse of previous leaks cases, including the attempted prosecution of a former National Security Agency executive, Thomas Drake.

“The government will say that any guilty plea is a win, and the defense will say they were forced into a corner,” said Steven Aftergood, an expert on classification issues with the Federation of American Scientists. “In some sense, they will both be right.”

Kiriakou is only the second person convicted of violating a 1970s law that made it illegal to disclose the identities of undercover U.S. intelligence operatives. In 1985, CIA officer Sharon Scranage pleaded guilty to disclosing the names of other agents to her boyfriend in Ghana and was sentenced to five years in prison, Aftergood said.

Kiriakou had initially pleaded not guilty to all the charges and insisted that he had never knowingly shared classified information or leaked other secrets. The government’s case against him was based largely on e-mail exchanges between Kiriakou and news reporters, as well as his responses when confronted about the disclosures by FBI agents.