NEW YORK — The Bureau of Prisons has acknowledged for the first time that two of its officials traveled 14 years ago to a secret CIA detention site in Afghanistan, where they provided training to staff at a facility once described by an intelligence official as “the closest thing he has seen to a dungeon.”

The admission came Thursday in response to a lawsuit filed by the ACLU, which sued in April after the Bureau of Prisons denied having any record of involvement with the detention site.

The Bureau of Prisons’ November 2002 visit to the site — known interchangeably as “The Salt Pit” and COBALT — was documented in a Senate Intelligence Committee report on torture, interrogation and detention, which was released in 2014.

Get Breaking News Delivered to Your Inbox

The report notes that prison officials determined the site was “not inhumane” despite seeing detainees who were forced to stand for days naked and shackled to walls in total darkness, “in a facility that was described to be 45 degrees Fahrenheit.” Loud music played around the clock and the detainees were given only buckets for their waste.

The CIA asked for the Bureau of Prisons inspection, because agents worried conditions were too harsh for them to elicit reliable intelligence, according to the Senate report.

Some detainees “’literally looked like (dogs) that had been kenneled,” one interrogator said, according to the Senate report. “When the doors to their cells were opened, ‘they cowered.’”

Gul Rahman (pictured) died in the early hours of Nov. 20, 2002, after being shackled to a cold cement wall in a secret CIA prison in northern Kabul known as the Salt Pit. AP Photo/Habib Rahman, Ho

During the prison officials’ visit, one detainee, Gul Rahman, died from apparent hypothermia, “naked except for a sweatshirt,” the report said. Rahman was well-known in Afghanistan after an earlier incident in which he rescued the country’s president, Hamid Karzai, while wading through rocket and small-arms fire.

Prison officials said they were “wow’ed” and had “never been in a facility where individuals are so sensory deprived,” according to the Senate report.

The Bureau of Prisons is a domestic law enforcement agency that does not have the authority to classify intelligence information. The agency explained in the legal filing on Thursday that the two officials who visited the detention site were told by the CIA “that they were not permitted to discuss their participation in this training, or to create or retain any records of the training or their involvement.”

Despite the extraordinary, and rare, assignment to travel to a war zone, one of the two officials told a Bureau of Prisons lawyer this year that he “never saw a written request .... rather, his supervisor orally tasked him to participate.”

That same prisons official conducted training for the Department of Defense at Guantanamo Bay, and was allowed to produce limited documentation of that assignment.

Carl Takei, the ACLU attorney who first asked the Bureau of Prisons for information about the COBALT visit in a Freedom of Information Act request, said Thursday’s acknowledgement raises new questions about the agency’s role at the detention site.

“These two particular individuals, according to the Senate report, saw a place that was simply horrifying and they had a chance to raise alarms about these conditions of confinement. Instead of doing that, they allowed it to proceed unopposed,” Takei said.

He added that it’s an issue that has suddenly become pressing in the days since members of President-elect Donald Trump’s transition team have indicated an interest in reinstating approval for certain controversial interrogation techniques.

“As we transition from the Obama administration to the Trump administration, this entire question of official torture is being raised anew,” Takei said. “This is an illustration of how when there’s an administration that officially endorses torture, that endorsement effects every level of government.”

The ACLU said Monday it is dropping its lawsuit against the Bureau of Prisons because of Thursday’s disclosure.

The Bureau of Prisons filing includes a series of emails sent in 2011 and 2015 about the Afghanistan trip.

The 2015 email includes a link to a CBS News article about the agency’s visit to the detention site, and the email’s subject line was the title of the article.

In the body of the email, the sender wrote just one sentence: “They just won’t let it go.”

The Bureau of Prisons has not yet responded to a request for comment on this case.