ALEXANDRIA, Va. (AP)  After pushing for years to get testimony from a recalcitrant New York Times reporter in a CIA leak case, prosecutors launched an unsuccessful last-minute attempt Monday to bar journalist James Risen from testifying at all.

But at a pretrial hearing Monday afternoon, U.S. District Judge Leonie Brinkema rejected prosecutors” request after defense lawyers said Risen”s testimony is important to their case.

Sterling”s trial has been on hold since 2011 largely because of legal wrangling over whether Risen could be forced to testify. In June, the U.S. Supreme Court turned aside an appeal from Risen seeking immunity from a subpoena on First Amendment grounds.

Free-press advocates lobbied Attorney General Eric Holder against a legal showdown with Risen that could have ended with the reporter being thrown in jail for contempt of court for refusing to testify about his confidential sources. Federal prosecutors eventually promised they would not pressure Risen to reveal whether Sterling was a source for his 2006 book “State of War,” which details a plan by the CIA to supply Iran with flawed blueprints for its nuclear program.

At a pretrial hearing last week, Risen testified that he would not divulge confidential sources under any circumstances. He answered only a few cursory questions confirming that he was the author of “State of War” and that he relied on a variety of sources.

On Monday, prosecutors filed a motion arguing that Risen”s recalcitrance makes him useless as a witness, and so neither side should be allowed to call him.

Defense lawyer Edward MacMahon said Risen”s testimony is valuable to the defense and that the government shouldn”t be allowed to erase Risen from the trial just because prosecutors are now choosing not to call him.

“He”s not unavailable (to testify) in a legal sense. He”s politically unavailable is what he is,” MacMahon said. “If the government doesn”t want to call a witness that they said all along is a key witness … that”s just something where they”re going to have to live with the consequences.”

Brinkema agreed that Risen”s testimony about reliance on multiple sources could be useful to the defense.

However, Risen is not expected to offer live testimony in front of the jury. Instead, the jury will hear a transcript of the testimony Risen gave at his pretrial hearing.

Left unresolved Monday was a request by prosecutors for a jury instruction that no inference be drawn against the government because Risen was not called by prosecutors. Defense lawyers say they want to point out to the jury what they see as a gaping hole left by Risen”s absence from the government”s case.