Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

ALEXANDRIA, Va. — A former CIA officer was convicted Monday of leaking details of a covert mission to derail Iran's nuclear program in a case that, until the eve of the trial, was as much about the journalist who published the leaks as it was the accused leaker.

The government gave up on its effort to force New York Times reporter James Risen to reveal his sources — and ultimately didn't need him to win a conviction.

Jurors convicted Jeffrey Sterling, 47, of O'Fallon, Missouri, of all nine counts he faced in federal court.

At issue in the two-week trial: Who told Risen about the mission, one that former national security adviser Condoleezza Rice testified was among the government's most closely held secrets during her tenure as well as one of its best chances to derail Iran's nuclear-weapons ambitions?

The case was delayed for years as prosecutors fought to force Risen to divulge his sources. Risen eventually lost his legal battle to quash a government subpoena, though prosecutors ultimately decided not to call him to testify once it became clear he would not reveal those sources even if jailed for contempt of court and free-press advocates lobbied on Risen's behalf.

Former CIA officer Jeffrey Sterling leaves the Alexandria Federal Courthouse, Monday, Jan. 26, 2015, in Alexandria, Va., with his wife, Holly, after being convicted on all nine counts he faced of leaking classified details of an operation to thwart Iran's nuclear ambitions to a New York Times reporter. Kevin Wolf / AP

Prosecutors had acknowledged a lack of direct evidence against Sterling but said the circumstantial evidence against him was overwhelming. Defense lawyers had said the evidence showed that Capitol Hill staffers who had been briefed on the classified operation were more likely the source of the leak.

Following the verdict, defense lawyer Edward MacMahon said he was disappointed but "we still believe in Jeffrey's innocence." He said the defense will pursue every available legal option to get the jury's verdict overturned.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Sterling will have the option to appeal his case after he is sentenced in April. Motions to dismiss the case on various legal grounds are also still pending in front of the trial judge, U.S. District Judge Leonie Brinkema.

The classified operation at the heart of the trial involved using a CIA asset nicknamed Merlin, who had been a Russian nuclear engineer, to foist deliberately flawed nuclear-weapons blueprints on the Iranians, hoping they would spend years trying to develop parts that had no hope of ever working.

Risen's 2006 book, "State of War," describes the mission as hopelessly botched, and possibly backfiring by giving the Iranians blueprints that could be useful to them if they sorted out the good information from the errors.

Throughout the trial, numerous CIA officers testified that they had deemed the program a success, even though the Iranians never followed up with Merlin to get additional blueprints he had offered to them as part of the ruse.

In his closing arguments, prosecutor Eric Olshan said the chapter of Risen's book seemed to be clearly written from Sterling's perspective as Merlin's case handler. The book describes the handler's misgivings about the operation while others at the CIA push the plan through despite its risks.

Furthermore, Sterling believed he had been mistreated and was angry that the agency refused to settle his racial discrimination complaint, Olshan said.

Risen had written about that complaint, and he was known to have a relationship with Sterling. The two exchanged dozens of phone calls and emails, Olshan said.

But defense lawyers said the government had no evidence that Risen and Sterling talked about anything classified in those phone calls and emails. The government failed to obtain Risen's records to see who else he may have contacted.

Just before lunch on Monday — the jurors' third day of deliberations, they sent a note to the judge saying they could not reach a unanimous verdict on some counts. But after the judge urged them to keep talking, they delivered guilty verdicts later in the afternoon.

Jurors declined to comment leaving the courthouse.

U.S. Attorney for the Eastern District of Virginia Dana Boente, in a written statement, described Sterling as "a disgruntled former CIA employee" and said the leak "was illegal and went against Mr. Sterling's professional commitments to the CIA."

"Mr. Sterling's vindictive and careless choices ultimately led us here today and to this unanimous verdict."

Risen did not return a call and email seeking comment.

IN-DEPTH

— The Associated Press