The Justice Department has opened full criminal investigations of the deaths in CIA custody of two detainees, including one who perished at Iraq’s notorious Abu Ghraib prison, U.S. officials said Thursday.

The decision, announced by Attorney General Eric H. Holder Jr., means continued legal jeopardy for several CIA operatives but at the same time closes the book on inquiries that potentially threatened many others. A federal prosecutor reviewed 101 cases in which agency officers and contractors interrogated suspected terrorists during years of military action after the Sept. 11, 2001, attacks but found cause to pursue criminal cases in only two.

Many of the other suspected terrorists were subjected to harsh interrogation techniques that provoked divisive national debate, with some calling the techniques legal and necessary and others shunning them as government-sanctioned torture.

“On this, my last day as director, I welcome the news that the broader inquiries are behind us,” said a statement from CIA Director Leon Panetta, who will take over as defense secretary on Friday. “We are now finally about to close this chapter of our agency’s history.”

The Justice Department did not say which cases are being investigated, but U.S. officials said they are the death of an Afghan, Gul Rahman, in 2002 at a prison known as the Salt Pit in Afghanistan, and that of an Iraqi, Manadel al-Jamadi, who was questioned by three CIA officers at Abu Ghraib in 2003.

In the case involving the Salt Pit, known as a “black site” because the U.S. government did not officially acknowledge its existence, a CIA officer allegedly ordered Afghan guards in November 2002 to strip Rahman and chain him to the concrete floor of his cell. Temperatures plunged overnight, and Rahman froze to death. Hypothermia was listed as the cause of death and Rahman was buried in an unmarked grave.

Jamadi, the Iraqi, was captured on Nov. 4, 2003, by a Navy SEAL team hunting a terrorist cell thought to be responsible for a bombing in Baghdad. After initial interrogation efforts, he was transferred into CIA custody and was taken to Abu Ghraib. There he was hooded, placed in an orange jumpsuit and shackled to window bars in a shower room, where he died.

Jamadi’s body was put on ice to preserve it for autopsy. U.S. soldiers posed for photographs with the body — including some in which they gave the thumbs-up sign — provoking international outrage when news organizations showed the images.

The Jamadi case has been moving before a grand jury in Alexandria in recent weeks, according to people familiar with the proceedings who spoke on the condition of anonymity because grand jury deliberations are secret. Members of the military who worked at Abu Ghraib around the time of Jamadi’s death faced questions that largely focused on the circumstances of the death and what the CIA’s involvement was in capturing, transporting and interrogating him at the prison.

A CIA officer at Abu Ghraib who was in charge of extracting actionable intelligence from detainees was withdrawn from Iraq after the death, according to a former intelligence official, who, like several officials quoted in this article, spoke on the condition of anonymity to discuss sensitive matters. Two other CIA officers were also present.

One person who spoke to federal authorities in recent weeks said they are particularly interested in the CIA’s involvement in Jamadi’s interrogation and what happened in the shower room before his death.

“They seemed to be focused on who was there and time frames and policies and procedures,” the person said. “How did they get to come to Abu Ghraib? What happened to the hood the guy had on? Those types of questions.”

At CIA headquarters on Thursday, Holder’s announcement was greeted with relief. But one former CIA official who was involved in overseeing the interrogation program said that the ongoing legal cloud will be a concern at the agency. Even operatives who are not targets of the criminal case may have to testify before a grand jury.

“It’s good that he’s narrowed things down to two cases,” the former CIA official said. “On the other hand, he’s been looking at these cases for two years and all he can say is they need more investigating? It’s draining on people involved. On resources. We need some sort of finality.”

Meanwhile, human rights groups, which had called for a full criminal investigation of the program — including its creators and those who ran it — expressed disappointment.

“It is difficult to understand the prosecutor’s conclusion that only those two deaths warrant further investigation,” said Jameel Jaffer, deputy legal director of the American Civil Liberties Union. “For a period of several years, and with the approval of the Bush administration’s most senior officials, the CIA operated an interrogation program that subjected prisoners to unimaginable cruelty and violated both international and domestic law. The narrow investigation that Attorney General Holder announced today is not proportionate to the scale and scope of the wrongdoing.”

After the Sept. 11 attacks, the CIA created a network of secret prisons around the world to confine “high-value” al-Qaeda operatives. The detainees were subjected to what the agency called “enhanced interrogation techniques” — escalating forms of duress that began with slaps to the face and ended, in three cases, with prolonged bouts of waterboarding, which simulates drowning.

Among those held by the CIA were leading al-Qaeda figures, including Khalid Sheik Mohammed, the self-proclaimed mastermind of the Sept. 11 attacks, who was waterboarded 183 times after his capture in March 2003.

Under the George W. Bush administration, the Justice Department’s Office of Legal Counsel approved the techniques as legal.

Almost from the inception of the CIA’s interrogation program, agency officials expressed misgivings internally and warned of a potential day of reckoning. A 2004 CIA inspector general’s report said multiple officers had “expressed unsolicited concern about the possibility of recrimination or legal action” resulting from their participation in the interrogation mission.

The Obama administration closed the CIA prisons and barred the use of the enhanced techniques. The Justice Department said it would not prosecute any CIA personnel who acted in good faith and followed the guidance of the Office of Legal Counsel.

But Holder ordered a “preliminary review” by John Durham, an assistant U.S. attorney in Connecticut, to find out whether any unauthorized interrogation techniques were used at overseas locations. Durham was already investigating the destruction of videotapes of the interviews of high-value detainees at overseas sites. Last November, he opted not to file criminal charges against CIA operatives involved in the decision to burn the tapes at a secret facility in Thailand.

Holder’s expansion of Durham’s mandate to include the treatment of detainees sparked rancorous debate. Some argued that legal accountability was essential, and others said an investigation would sap agency morale and undermine the struggle against terrorism.

“Mr. Durham and his team reviewed a tremendous volume of information pertaining to the detainees,” Holder said in a statement Thursday.

Other federal prosecutors had examined both cases that Durham recommended for a full criminal investigation. A team of prosecutors at the U.S. attorney’s office in Alexandria had looked into numerous cases, traveling the world to talk to witnesses, and they ultimately prepared memos explaining why they did not charge CIA interrogators and contractors.

Prosecutors concluded in the first investigation that the Salt Pit prison was outside the reach of U.S. law, even though the CIA funded it and vetted its guards.

Staff writers Jerry Markon, Greg Miller and Josh White contributed to this report.