BEFORE leaving office, Barack Obama warned he was willing to be vocal in retirement.

Well, the former US president has already taken his first swipe at Donald Trump. Today Mr Obama released a statement responding to Mr Trump’s controversial immigration ban - and it’s pretty obvious he’s not a fan.

Mr Obama expressed his support for those protesting against the ban, which he said contravened “American values”.

“President Obama is heartened by the level of engagement taking place in communities around the country. Citizens exercising their Constitutional right to assemble, organise and have their voices heard by their elected officials is exactly what we expect to see when American values are at stake,” spokesman Kevin Lewis said on Mr Obama’s behalf.

“With regard to comparisons to President Obama's foreign policy decisions, as we’ve heard before, the president fundamentally disagrees with the notion of discriminating against individuals because of their faith and religion.”

Mr Trump would likely dispute that characterisation of his policy. He has rejected accusations the executive order amounts to a “Muslim ban”, pointing out that it doesn’t include dozens of majority-Muslim countries. Instead, he says it is aimed at stopping extremists from entering the United States.

“To be clear, this is not a Muslim ban, as the media is falsely reporting. This is not about religion, this is about terror and keeping our country safe,” the president said in a statement yesterday.

“There are over 40 different countries worldwide that are majority Muslim that are not affected by this order.

“I have tremendous feeling for the people involved in this horrific humanitarian crisis in Syria. My first priority will always be to protect and serve our country, but as President I will find ways to help all those who are suffering.”

The executive order, signed on Friday, bars the citizens of seven nations — Iraq, Iran, Syria, Sudan, Somalia, Libya and Yemen — from travelling to the US for at least 90 days. Mr Trump has also imposed a 120-day suspension on America’s refugee program.

Mr Obama is taking a somewhat unusual step by publicly commenting on the Trump administration’s policies. Former presidents typically give their successors quite a lot of breathing space - Mr Obama’s predecessor, George W. Bush, has remained virtually silent for the last eight years. And while Bill Clinton was active in both of Hillary’s White House campaigns, he spent most of his immediate post-presidential years focusing on humanitarian issues.

Mr Obama, on the other hand, signalled his intentions to be vocal in retirement months ago.

“As an American citizen who cares deeply about our country, if there are issues that have less to do witht he specifics of some legislative proposal or battle or go to core questions about our values and ideals, and if I think that it’s necessary or helpful for me to defend those ideals, I’ll examine it when it comes,” Mr Obama said.