Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

LONDON — President Obama and London Mayor Boris Johnson traded sharp rhetoric Friday over Britain's national referendum on the European Union, a battle that spilled from the pages of local newspapers and into public appearances.

The Obama-Johnson feud started with the publication of an op-ed article in The Daily Telegraph, timed with the president's arrival in London for a birthday lunch with Queen Elizabeth II, in which he urged British voters to choose to remain in the EU.

Britons will vote in a June 23 referendum on whether to remain in the EU or leave. The so-called Brexit debate has divided the country (PDF) and its political establishment.

Related: 'Brexit' Vote: Why Britain Could Quit EU and Why America Cares

In his op-ed, Obama argued that European coordination on intelligence sharing, counterterrorism and economic growth "will be far more effective" if Britain stays. "The European Union doesn't moderate British influence — it magnifies it. A strong Europe is not a threat to Britain's global leadership; it enhances Britain's global leadership."

Johnson, who was born in New York, wrote an an angry riposte in The Sun. "It is incoherent. It is inconsistent, and yes it is downright hypocritical," he wrote. "The Americans would never contemplate anything like the EU, for themselves or for their neighbors in their own hemisphere. Why should they think it right for us?"

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

He later doubled down on those remarks. "It is very odd, it is perverse, it is hypocritical," he told reporters.

The mayor also criticized Obama for removing a bust of Winston Churchill from the Oval Office of the White House. “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,” Johnson wrote. Kenya was a British colony until 1963.

Obama responded in a press conference with British Prime Minister David Cameron, the leading voice in favor of remaining in the EU.

Related: Obama Warns Britain on EU 'Brexit' Vote: 'No Man Is an Island'

The president said he was just offering on his opinion on something that could impact the United States. He said he wasn't being hypocritical, since the United States is already part of the United Nations, World Bank, International Monetary Fund and NATO.

He dashed hopes among anti-EU campaigners that Britain could negotiate a new trade deal with America, saying an isolated United Kingdom "is going to be in the back of the queue."

And Obama clarified the Churchill bust issue, saying that the figure was removed from the Oval Office to make way for a bust of Dr. Martin Luther King Jr. (which sits next to one of Abraham Lincoln) and stressed that a second Churchill bust still sits outside his White House office.

"I love Winston Churchill. Love the guy," Obama said.

That turned the spotlight back to Johnson, who told reporters that he was "a huge fan" of Obama's but repeated the charge of hypocrisy. He accused the United States of refusing to subject its citizens to the International Criminal Court or adopt a U.N. conventions on children's rights. Asking the United Kingdom to stay in the EU "is very, very perverse," he said.

President Barack Obama arrives Thursday on Marine One at Winfield House in London. Carolyn Kaster / AP

Johnson dodged questions about Obama's Kenyan ancestry and whether his op-ed was racist. "I think people are trying to distract from the issue," he said as he walked away from reporters.

Former Conservative Party leader Iain Duncan Smith told The Daily Express that he could "imagine no circumstances" under which Obama would accept foreign control or taxes over the United States.

"What I do find strange is that he is asking the British people to accept a situation that he patently would not recommend to the American population," said Duncan Smith, who remains an influential member of Parliament.

Jacob Rees-Mogg, another anti-EU Conservative member of Parliament, said: "I can’t think the British people will want to be told what to do by a rather unsuccessful American president who has had one of the least successful foreign policies in modern history."

Churchill’s grandson Nicholas Soames, who is also a member of parliament, said Johnson’s response was “appalling.”