US President Donald Trump has slammed the Obama administration for releasing prisoners from the Guantanamo Bay and termed it a "terrible decision".

"122 vicious prisoners, released by the Obama Administration from Gitmo, have returned to the battlefield.

Just another terrible decision!" Trump said in a tweet on Tuesday.

"This President is very clear that he understands the nature of the threat that the people in Gitmo pose to our nation, and the recidivism rate that are there among people we have released. That is a concern that he shares," White House Press Secretary Sean Spicer said yesterday.

Defending the Bush administration's decision to release prisoners, he said "it was in many cases they were under court order."

"The Obama administration made it actually a priority to let people go, and to actively desire to close that camp and to release more and more of those people, especially in the waning days," Spicer said.

Spicer said there is a huge contrast between the posture and the policy of the last two administrations on how they were dealing with Gitmo.

"This administration understands, and the President has been very clear. He understands that people kept in Gitmo pose a danger to our country and to the rest of the world. There's a big, big difference between the posture of those two," he said.

Trump's predecessor Obama had made it a top priority to close down the Guantanamo Bay, as he believed that its existence makes the United States unsafe but was unable to do so, mainly due to the opposition from the Congress.

The Guantanamo Bay detention camp is located within Guantanamo Bay Naval Base, Cuba.

The camp was established by former President George W Bush's administration in 2002 during his 'war on terror' in response to the 9/11 attacks in 2001.

US has also rejected the reports of using Guantanamo Bay prison to detain refugees.

"There is nothing to consider it for. We're fine right now. There's nothing that we would need to use it for," Sean Spicer said.

Asked about the ongoing military exercise in Guantanamo Bay, he described it as "routine exercise" saying the military prepares for a whole host of contingency operations.

"It is a routine military operation. As several of them do with our partners throughout the world where we plan for random, contingencies that may or may not happen. That's the job of the military to practice for contingencies that may or may not happen on a whole host of issues," Spicer added.