REUTERS/Toby Melville
Obama, in turn, made an impassioned plea to Britons to remain a part of the union, about two months before the country is set to vote on the prospect.
Boris Johnson, the New York-born mayor of London and a leader of the "Out" campaign who has hinted he wants to be the UK's prime minister, derided Obama's arguments in a newspaper column that referred to "the part-Kenyan President's ancestral dislike of the British empire."
Johnson cited the supposed removal of a bust of former British Prime Minister Winston Churchill from the Oval Office as apparent proof that Obama is anti-Britain. Johnson claimed in his column that the bust was sent to the British embassy in Washington, DC.
"Some said it was a snub to Britain," Johnson wrote in the Sun newspaper. "Some said it was a symbol of the part-Kenyan President's ancestral dislike of the British empire - of which Churchill had been such a fervent defender."
In 2012, the White House dispelled the rumor of the Churchill bust and noted that it remains in the White House. John McDonnell, the opposition Labour Party's finance policy chief, called Johnson's remarks "dog-whistle racism."
For his part, Obama pointed out that the Churchill bust was relocated to his residence in the White House and noted that there was a different bust he wanted to see in the Oval Office.
"I thought ... as the first African-American President, it might be appropriate to have a bust of Dr. Martin Luther King in my office, to remind me of all the hard work of a lot of people, who would somehow allow me to have the privilege of holding this office," Obama said at a press conference on Friday when he was asked about Johnson's comments.
After bashing Obama over the bust in his column, Johnson argued in favor of Britain leaving the EU.
During the press conference alongside British Prime Minister David Cameron, Obama advised the UK to remain in the union. He said that if Britain left the EU, there might eventually be a new commerce agreement between the two countries, but that Britain would be at the "back of the queue" for a trade deal.
"It's fair to say that maybe some point down the line there might be a UK-US trade agreement but that's not going to happen any time soon because our focus is in negotiating with a big bloc, the European Union, to get a trade agreement done," Obama said.
"And the UK is going to be in the back of the queue - not because we don't have a special relationship but because given the heavy lift on any trade agreement, us having access to a big market with a lot of countries rather than trying to do piecemeal trade agreements is hugely efficient."
The United Kingdom was one stop on Obama's international trip this week. He visited England after a trip to Saudi Arabia.