President Obama has said he “absolutely” has been the victim of racism during his time in office.

The US President suggested the criticism he faced from “whites in Southern states” was a result of the colour of his skin.

He told CNN: "There's a reason why attitudes about my presidency among whites in Northern states are very different from whites in Southern states.

“Are there folks whose primary concern about me has been that I seem foreign, the other? Are those who champion the "birther" movement feeding off of bias? Absolutely.”

Racism was not a major element of mainstream Republican opposition to his presidency but was an issue on the political fringe, he added.

Mr Obama has faced repeated questions about whether he was born in the US – despite there being no evidence he was not.

President-elect Donald Trump is among those who suggested Mr Obama is not really American and that his birth certificate is a fake.

However, Mr Trump has shifted his position in recent months, saying: “President Barack Obama was born in the United States, period. Now, we all want to get back to making America strong and great again.”

Barack Obama hands out his final Presidential Medal of Freedom awards Show all 10 1 /10 Barack Obama hands out his final Presidential Medal of Freedom awards Barack Obama hands out his final Presidential Medal of Freedom awards Tom Hanks Barack Obama smiles before presenting actor Tom Hanks with the Presidential Medal of Freedom Getty Barack Obama hands out his final Presidential Medal of Freedom awards Cicely Tyson President Barack Obama presents the Presidential Medal of Freedom to actress Cicely Tyson Getty Barack Obama hands out his final Presidential Medal of Freedom awards Michael Jordan Michael Jordan waits to receive his medal Getty Barack Obama hands out his final Presidential Medal of Freedom awards Melinda and Bill Gates Melinda and Bill Gates receive their medals Getty Barack Obama hands out his final Presidential Medal of Freedom awards Ellen DeGeneres and Robert De Niro Robert De Niro comforts Ellen DeGeneres after she becomes emotional accepting her medal Getty Barack Obama hands out his final Presidential Medal of Freedom awards Eduardo Padron President Barack Obama awards the Presidential Medal of Freedom to higher education advocate and Miami Dade College President Eduardo Padron Barack Obama hands out his final Presidential Medal of Freedom awards Diana Ross Diana Ross and President Obama Getty Barack Obama hands out his final Presidential Medal of Freedom awards Robert De Niro Obama awards Robert De Niro the Presidential Medal of Freedom Getty Barack Obama hands out his final Presidential Medal of Freedom awards Kareem Abdul-Jabbar Barack Obama congratulates National Basketball Association all-time leading scorer and social justice advocate Kareem Abdul-Jabbar Getty Barack Obama hands out his final Presidential Medal of Freedom awards Ellen DeGeneres Comedian and talk show host Ellen DeGeneres wipes away tears as her citation is read before being awarded the Presidential Medal of Freedom by U.S. President Barack Obama Getty

Mr Obama’s former senior adviser, David Axelrod, who now runs the University of Chicago’s Institute of Politics, agreed that the President had suffered from racial prejudice.

He told CNN: 'It's indisputable that there was a ferocity to the opposition and a lack of respect to him that was a function of race."

Mr Axelrod recounted an incident in which a powerful Republican had told Mr Obama: "You know, we don't really think you should be here, but the American people thought otherwise so we're going to have to work with you."

The comments were made during a CNN documentary special, The Legacy of Barack Obama, that aired on Wednesday night.

Obama: I'll weigh in on Trump's presidency if necessary

Some experts have previously suggested Mr Trump’s shock victory in the 8 November presidential election was a result of racism against Mr Obama.

Michael Tesler, an assistant professor of political science at the University of Columbia, said: “Obama’s presidency rapidly accelerated the pre-existing relationship between party identification and racial attitudes.

“Moreover, he activated a previously non-existent partisan divide according to attitudes about Muslims – one that contributes to partisan sorting even after controlling for racial attitudes."

The issue of race has never been far from the surface during Mr Obama’s presidency. In 2012, following the shooting of Trayvon Martin, an unarmed black teenager in Florida, he divided opinion by saying if he had a son “he would look like Trayvon”.

The current President also came under pressure during the Black Lives Matter protests over the shootings of unarmed black Americans by police officers. Many urged him to do more to support the protestors, while others criticised him for not being stronger in defending law enforcement agencies.