Barack Obama used his final speech before a uniformed military audience, to tout the counter-terrorism strategies implemented during his tenure, while warning his successor against jeopardising American values in pursuit of national security.

Speaking before a congregation of military personnel at the MacDill Air Force Base, in Florida on 6 December, the president defended the military actions taken in Afghanistan and later against the Islamic State (Isis).

Without naming Donald Trump in particular, he urged the president-elect to be cautious when implementing new security measures. "Adhering to the rule of law is not a weakness in the long term, it is our greatest strength," Obama said during an address at the Florida headquarters of US Central Command and Special Operations Command.

"The whole objective of these terrorists is to scare us into changing the nature of who we are and our democracy. And the fact is, people and nations do not make good decisions when they are driven by fear."

Urging the incoming administration not to pull down diplomatic achievements like the Iran nuclear deal made during his tenure, Obama suggested that it would be a backward step and a win for the enemy.

"Terrorists would love to see us walk away from the type of work that builds international coalitions and ends conflicts and stops the spread of deadly weapons," he said. "It would make life easier for them. It would be a tragic mistake for us.

Barack Obama
President Barack Obama speaks about counter-terrorism during his visit to MacDill Air Force Base REUTERS/Kevin Lamarque

"We have to pursue a smart strategy," he said, acknowledging terrorism as a threat "will endure".

Trump, during his presidential campaign had supported the use of harsher methods of interrogation like water boarding while promising to impose a ban on Muslims in the US.

"At no time has anybody told me it cost us good intelligence," the outgoing president said, standing by his ban on using torture on suspects. He then went on to slam Congress for their inability to close down the Guantanamo Bay detention centre.

"Until Congress changes course, it will be judged harshly by history, and I will continue to do all I can to remove this blot on our national honour," he said.

Watch the complete video of Obama's speech below:

The major highlights of the Obama administration include the success of killing Osama Bin Laden and ending large-scale troop deployment in Afghanistan and Iran. However, his other national security measures such as drone strikes and global mass surveillance continue to receive criticism and his speech on Tuesday was deemed a selective account of his record.