Convicted CIA leaker Jeffrey Sterling was sentenced to 42 months in prison under the Espionage Act. He was found guilty of nine counts of unauthorized disclosure of national defense information about a covert operation and other related charges.

Sterling was given an additional two years of supervised release after he finishes his time in jail. The government had sought a prison term of more than 20 years for Sterling, but the judge told prosecutors at the sentencing that was too harsh a punishment, according to the New York Times’ Matt Apuzzo.

Former CIA Officer Jeffrey Sterling sentenced to 42 months in prison for leaks pertaining to covert operation. — Manuel Rapalo (@Manuel_Rapalo) May 11, 2015

It was a very emotional day in the Alexandria, Virginia courtroom, RT’s Manuel Rapalo reported. Sterling was given the opportunity to say a few words during the hearing, during which time he thanked the jury and those in the courtroom for being courteous and kind to him. He also thanked the judge for allowing him to attend his brother’s funeral after he was convicted in January.

The former CIA officer, who was fired in the early 2000s, was charged under the Espionage Act for disclosing classified information about a mission meant to slow Iran’s nuclear program to New York Times reporter James Risen, who then wrote about the CIA’s Iranian plot “Operation Merlin” in his 2006 book, ‘State of War’. The plan was designed to project a negative image of Iran’s nuclear program, learn more about it program and impair its progress. Flawed nuclear weapon schematics were reportedly funneled to the Iranians via a Russian scientist with the codename “Merlin.”

Jeffrey Sterling, wife Holly and lawyers arrive at courthouse for sentencing. pic.twitter.com/zRcH5BRwk2 — Peter Maass (@maassp) May 11, 2015

Risen was also critical of Operation Merlin in his book, saying it could have inadvertently helped Iran if they were able to identify what was wrong with the blueprints. Prosecutor Eric Olshan argued in court that these criticisms matched up with Sterling’s own view of the mission, and portrayed the CIA as unresponsive to potential risks.

READ MORE: CIA whistleblower Jeffrey Sterling found guilty on all counts

Olshan and the prosecution painted Sterling as a disgruntled employee who leaked the information because of unrelated grievances stemming from a racial discrimination complaint filed by Sterling, who is African American, against the CIA.

Sterling was the fifth person in US history to be charged with mishandling national defense information under the Espionage Act.

READ MORE: Petraeus may not get jail time for talking to a journalist, but Sterling and others did

In remarks of his own, US District Judge Leonie M. Brinkema mentioned the punishments meted out against other government whistleblowers, including Gen. David Petraeus, who was sentenced to two years probation for leaking documents to his biographer, a woman who was also his mistress, as well as that of John Kiriakou, Rapalo said.

Brinkema said that the sentence was harsher for Sterling than for Kiriakou because Sterling did not plead guilty, while Kiriakou did. Kiriakou, who blew the whistle on the CIA’s use of waterboarding, was sentenced to 30 months in federal prison for leaking the name of a covert officer.

Brinkema did not say when Sterling is to report to prison; he has remained free on bail since his conviction in January.