US President Barack Obama used his final day in office to blast Congress for leaving him with unfinished business in closing the military prison at Guantanamo Bay and to commute the sentences of 330 people serving prison terms on drug charges.
Obama sent a letter to Congress on Thursday blaming lawmakers for his failure to close the prison in Cuba.
Obama leaves office with 41 detainees remaining at the facility used to detain terrorist suspects in 2002 as the George W Bush administration grappled with the fallout of the September 11, 2001, terrorist attacks and the start of the US war in Afghanistan.
Obama had pledged to shutter the facility, ordering its closure just days after taking office in 2009.
His administration however has run up against frequent road blocks, including public opposition, difficulty in finding third countries to accept detainees and legal prohibitions put in place by Congress.
The Obama administration transferred 196 detainees. The announcement that 41 detainees remain indicates four additional detainees had been transferred since the Pentagon announced the transfer of 10 men to Oman earlier this week.
"History will cast a harsh judgment on this aspect of ourfight against terrorism and those of us who fail to bring itto a responsible end," Obama wrote in the letter to Speaker of the House Paul Ryan.
"Guantanamo is contrary to our values and undermines ourstanding in the world, and it is long past time to end this chapter in our history."
The administration had developed a review process for detainees with the goal of transferring to other countries those deemed safe for release.
Obama's plans were to have included the indefinite detention of the most dangerous, including Khalid Sheikh Mohammad, who is charged as the alleged mastermind in the September 11 attacks, but he faced opposition to the possibility they could be housed in prisons on US soil.
Separately, the commutations of drug offenders were part of a push he has made for criminal justice reform. They bring to 1,715 the number of individuals Obama has granted commutations, more than the previous 12 presidents combined.
The announcements come as White House staff were busy packing to clear the building ahead of the arrival of Trump staffers on Friday.
Obama leaves office Friday after eight years as Donald Trump is sworn in as president.