New York Times investigative reporter James Risen, who had been threatened with prison for his reporting, speaks during an event at the National Press Club on Aug. 14, 2014, in Washington. (Brendan Smialowski/AFP/Getty Images)

Attorney General Eric H. Holder Jr. has decided he will not force a New York Times reporter to reveal his confidential source in a high-profile leak investigation that has pitted the Obama administration against the press for years, according to a person familiar with the decision.

A federal judge had set a Tuesday deadline for the Justice Department to say whether it intended to compel Times reporter James Risen to identify his source in the trial of Jeffrey Sterling, a former CIA official who was accused of leaking classified information.

With that deadline approaching, Holder has told prosecutors that while they may still request a subpoena of Risen, the journalist cannot be required to reveal any information about the identity of his source, according to the person familiar with Holder’s decision, who spoke on the condition of anonymity to discuss internal deliberations.

Separately, Holder also has withdrawn his initial approval to subpoena a CBS producer to appear as a witness in a terrorism trial in New York after learning that the journalist would contest the effort to secure his testimony, according to U.S. officials.

The U.S. attorney for the Eastern District of Virginia, which is prosecuting the Sterling case, declined to comment on Holder’s decision on Risen, as did a Justice Department spokesman. Edward B. MacMahon, Sterling’s attorney, said that he had not been informed of any decisions about Risen but that the revelation, if true, was troubling.

“We’re waiting for the formal responses ordered by the court, but if the result is that the attorney general doesn’t want to issue the subpoena that his own Department of Justice fought for all the way to the U.S. Supreme Court, then three years of Mr. Sterling’s life have been wasted in litigation,” MacMahon said.

The Risen case had become a major flash point between the Justice Department and press advocates. Over nearly six years, the Obama administration has prosecuted eight leak cases, more than were pursued under all previous administrations combined.

The possibility that a reporter could have been compelled to divulge a source in a leak case or face prison time embroiled the Justice Department in a free-press controversy and sparked a prolonged court battle.

Holder had previously said that he would not oversee the jailing of a reporter who was protecting a source, and the Risen decision makes good on that promise. Holder recently said that his biggest regret as attorney general was how he handled a subpoena for a reporter for Fox News who federal prosecutors called a “criminal co-conspirator” because he had discussed classified information with a U.S. official.

Sterling is accused of being a source in Risen’s book, “State of War,” in which the reporter revealed an effort by the CIA to sabotage Iran’s nuclear arms program.

No decision has been made about whether to issue a subpoena to Risen, the official said. Holder’s decision not to force Risen to reveal his source was first reported by NBC News. Risen did not return a phone call seeking comment.

If prosecutors do subpoena Risen, it will only be to confirm particular information — that he wrote the book; that he reported information from a confidential source; and that he had an agreement not to reveal the source — said the person familiar with the matter.

In the CBS case, Preet Bharara, the U.S. attorney for the Southern District of New York, had asked Holder to approve a subpoena for Richard Bonin, a longtime producer for “60 Minutes,” to testify in a trial of two men accused in the 1998 bombings of two U.S. embassies in East Africa by al-Qaeda.

In a memo to Holder, Bharara indicated that if subpoenaed, Bonin would be willing to testify in the trial, set to start next month. Holder, acting on the basis of Bonin’s apparent willingness to testify, then approved the subpoena.

But a “60 Minutes” spokesman has said that Bonin was not approached by prosecutors and did not agree to testify. Issuing the subpoena threatened to embroil the Justice Department in another free-press controversy that it had no desire to pursue, the officials said. The Bonin subpoena request was first reported by the New York Times.

“At no time did Richard Bonin speak to anyone from the prosecutor’s office,” said Kevin Tedesco, a spokesman for CBS News’ “60 Minutes.” “From the outset, CBS has attempted to dissuade Justice from issuing a subpoena to Richard Bonin.”

Bonin’s potential testimony did not involve information about confidential sources and was not sparked by a leak investigation, officials said.

Bharara expected Bonin to testify about his contacts 16 years ago with Khaled al-Fawwaz, who has been accused of being a London-based media adviser and liaison for Osama bin Laden. Bonin was unsuccessful in his effort to secure an interview with bin Laden through Fawwaz.