Demonstrator Maboud Ebrahimzadeh is lowered onto the board during a simulation of waterboarding outside the Justice Department in Washington on Nov. 5, 2007. Reuters/Kevin Lamarque

A federal judge ordered the government to preserve a Senate report on Wednesday that documents the alleged torture of detainees in CIA custody through tactics such as regular beatings, forced rectal feeding, waterboarding, sensory and sleep deprivation and mock executions.

U.S. District Court Judge Royce Lamberth passed the order on the appeal filed by the attorneys representing Abd al-Rahim Al-Nashiri who was waterboarded while in CIA custody for his alleged involvement in the attack on the destroyer USS Cole in the port of Aden that killed 17 U.S. military personnel in October 2000.

The judge has also ordered for the preservation of all associated documents such as the CIA response to the report. He also directed for the report to be deposited with a court security officer. Although for now, the nearly 7,000-page report is being treated as a highly classified document, Lamberth's order raises the possibility of it being eventually released as a court record, according to Politico.

Several lawmakers such as Sen. Dianne Feinstein, Sen. Ron Wyden and human rights and transparency advocates have been urging Obama to release the fully declassified and unabridged version of the report (a 525-page executive summary of the report was released in 2014).

But according to a letter sent by White House Counsel Neil Eggleston to Feinstein on Dec 16, Obama has instead decided to place the report in his official presidential letters, making it available for declassification through public requests in 2029, according to Politico.

While his latest actions can make critics question Obama’s legacy, his administration has had partial success in weeding out the use of torture tactics. Obama and congress were instrumental in securing the passage of the 2015 National Defense Authorization Act senate.

And by doing so, Obama solidified an executive order signed by him in his first week of office that “established a task force to ensure humane treatment of detainees and barred them from being subjected to violence or humiliating and degrading treatment. ”

However, Obama was not able to deliver on his election promise of shutting down Guantanamo Bay, even though he made certain progress. Since its peak of more than 700 prisoners, when President George W. Bush in charge, the number of detainees remaining in Guantanamo Bay, Cuba, now is 59, according to the Orlando Sentinel. And with 19 more inmates expected to be resettled before the inauguration ceremony of president-elect Donald Trump, Obama will leave office with about 40 inmates remaining at the facility.

However, Trump has already said he plans to "load it ( Guantanamo Bay) up with some bad dudes." Though he has later gone on record to reverse his stand on the issue, Trump had also made several other controversial statements such as advocating the killing of terrorists' families, advocating for the use of waterboarding as an interrogation technique, remarking that “torture works” and also saying that “(we ) would bomb the s--- out of” the Islamic State.

But based on statements made by Trump’s pick for defense secretary – retired Marine Corps Gen. James Mattis who wields the power to revert the contentious methods of interrogation by mid-December 2017– use of waterboarding will not be revived.

“He said—I was surprised—he said, ‘I’ve never found it to be useful,’” Trump recalled in an interview with the New York Times. “He said, ‘I’ve always found, give me a pack of cigarettes and a couple of beers and I do better with that than I do with torture.’ And I was very impressed by that answer. I was surprised, because he’s known as being like the toughest guy.”