Updated on April 22 at 3:27 p.m. ET

President Obama’s warning to those championing Britain’s exit from the EU was stark: Leave, he said, and the “U.K. is going to be in the back of the queue” on trade deals with the U.S.

The American president was flanked by David Cameron, the British prime minister, who is advocating that Britain remain in the EU. Obama’s remarks at their joint news conference could not have been more effective had Cameron himself written them. (In fact, British commentators pointed out that Obama’s use of the word “queue,” preferred in the British isles, rather than “line,” used on this side of the Atlantic, suggested that this may well have been the case.)

Obama added that America’s special relationship with Britain “will continue, hopefully, eternally” even if the U.K. decides on June 23 to leave the bloc.  And, he said, while that decision was one for Britons to make, “The U.K. is at its best when it’s helping to lead a strong European Union. It leverages U.K. power to be part of the EU. I don’t think the EU moderates British influence in the world, it magnifies it.”

But it is the president’s remarks on trade deals that are likely to be seen as the biggest threat to those campaigning for the U.K. to leave the EU. Those championing that effort have repeatedly said Britain would negotiate on its own with the U.S. on trade agreements. Not so fast, Obama said.

“I think it’s fair to say that maybe some point down the line there might be a U.K.-U.S. trade agreement, but it’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,” he said. “The U.K. is going to be in the back of the queue.”

It was the strongest warning yet from Obama about the cost of a British exit from the EU—one that British commentators described as “battlefield nuclear device” against the Leave campaign.

Earlier, writing in The Telegraph, Obama made the case for Britain’s continued EU membership.

“The European Union doesn’t moderate British influence,” he wrote. “It magnifies it.” And, he added: “The United States sees how your powerful voice in Europe ensures that Europe takes a strong stance in the world, and keeps the EU open, outward looking, and closely linked to its allies on the other side of the Atlantic.”

Polls show the race is close—and the debate heated. Indeed, London Mayor Boris Johnson, a vocal advocate of leaving the EU—the so-called Brexit—appeared to suggest in the Sun Obama’s view had to do with the “part-Kenyan President’s ancestral dislike of the British empire.” It’s a statement for which he’s receiving much criticism—but the crux of his argument centers on the fact it’s a bit rich for the U.S. to lecture Britons to stay in an international institution that, in the London mayor’s view, erodes the country sovereignty, while the U.S. is adamantly opposed to doing anything remotely similar. Here’s more:

For the United States to tell us in the UK that we must surrender control of so much of our democracy – it is a breathtaking example of the principle of do-as-I-say-but-not-as-I-do.

It is incoherent. It is inconsistent, and yes it is downright hypocritical. The Americans would never contemplate anything like the EU, for themselves or for their neighbours in their own hemisphere. Why should they think it right for us?

Obama’s response to that criticism was simple: “All of us cherish our sovereignty … but the U.S. also recognizes that we strengthen our security through our membership of NATO, we strengthen our prosperity through organisations like the G7 and the G20. I believe the U.K. strengthens both our collective security and prosperity through the EU.”

Other supporters of Britain’s exit from the EU also criticized Obama’s remarks, some pointing out that it was unseemly for a foreign leader to intervene so overtly in a country’s internal affairs. (Polls show many Briton share that view). But the BBC points out that while historically the two countries have enjoyed a special relationship, the message Obama is sending Britons is the same as the one the U.S. sent after World War II: that the U.S. sees Britain’s place in the world as part of the European project.

Cameron also defended Obama’s intervention, saying though this is “the sovereign choice of the British people, but … it surely makes sense to listen to what our friends think.”

If there was any lingering resentment over the article in The Atlantic in which Obama appeared to question the special relationship between the two countries and seemed to suggest Cameron was a “distracted” leader, it did not show on Friday. The two leaders joked, traded compliments, and extolled the virtues of Britain’s EU membership—a position on which Cameron has staked his reputation (if not his political future). Nor is Obama’s direct intervention in a British referendum new. Two years ago, as the Scots were weighing whether to leave Britain, Obama tweeted:

But a tweet is hardly the same as a news conference in London standing next to an ally who is campaigning to keep his country in arguably one of the most important post-World War II institutions. Indeed, as Politico pointed out, Cameron had asked for Obama to “make the trip during the referendum campaign rather than wait until July when the president was also scheduled to be in Europe.” It doesn’t hurt that Obama—unlike Cameron—is extremely popular in Britain—and even more so among those undecided on whether to leave the EU; though we’ll have to wait until June 23 to find out if that persuades people to vote to stay.