US President Barack Obama has said Britain would go to the "back of the queue" for trade deals with the US if it votes to leave the European Union.
He said Britain was at its best when "helping to lead" a strong EU and membership made it a "bigger player" on the world stage.
He was speaking at the start of a three day visit to the UK.
UKIP leader Nigel Farage said Mr Obama would not be in office "by the time we're out of the EU post-referendum".
And he said trade deals would be in both countries' interests.
- Follow live updates of President Obama's visit to the UK
- 'Queen is my favourite person' - Obama
- Johnson accused of Obama ancestry slur
- In pictures: Barack Obama in the UK
Speaking at a joint press conference with Mr Obama, Prime Minister David Cameron said being a member of the EU strengthened Britain's "special relationship".
'Influence'
On the UK's upcoming referendum on its EU membership, he said: "This is our choice - nobody else's - the sovereign choice of the British people - but as we make that choice, it surely makes sense to listen to what our friends think."
Mr Obama said: "The UK is at its best when it's helping to lead a strong European Union. It leverages UK power to be part of the EU. I don't think the EU moderates British influence in the world, it magnifies it.
"America wants Britain's influence to grow, including within Europe."
On whether he should be intervening on the UK's referendum, he said: "Let me be clear: ultimately this is something the British voters have to decide for themselves.
"As part of our special relationship, part of being friends is to be honest and to let you know what I think, and speaking honestly, the outcome of that decision is a matter of deep interest to the US, because it affects our prosperity as well."
Earlier, the US president and his wife Michelle had lunch with the Queen and Duke of Edinburgh, and paid tribute to Her Majesty on her 90th birthday, describing her as "truly one of my favourite people".
'Big fan'
The Duke and Duchess of Cambridge and Prince Harry will welcome the Obamas for dinner at Kensington Palace on Friday evening.
Mr Obama's intervention into the EU referendum debate has been criticised as "hypocritical" by London Mayor and EU leave campaigner Boris Johnson, and UKIP leader Nigel Farage said he was the most anti-British US president ever.
EU referendum: In depth
Image copyright ReutersThe UK's EU vote: All you need to know
EU for beginners: A guide
Is Britain safer in or out of the EU?
A-Z guide to EU-speak
Who's who: The Vote Leave team
Who's who: The Remain campaign
Mr Johnson said that although he was a "big fan" of Mr Obama, remaining in the EU is "clearly something we have a disagreement on".
He said: "America's a proud democracy built on principles of liberty. It is hypocritical for us to be told by America to embroil ourselves ever more deeply in a structure which would be absolutely alien to American traditions.
"I think most Americans would accept that there is something rum about asking us to subordinate our democracy in this way, when America would not dream in a million years of doing likewise."
Mr Johnson originally criticised Mr Obama in an article in the Sun but has since been criticised for making comments about the president's "part-Kenyan" ancestry.
UKIP leader Nigel Farage told BBC News Mr Obama's views on the UK had been shaped by his Kenyan grandfather's experience of colonial Britain and he bears a grudge against Britain.