President John F Kennedy would have urged Britain to stay within the EU - and many in the US think opting out of Europe is akin to opting out of the 21st century, former foreign secretary David Miliband has warned.
Delivering the Kennedy Memorial Lecture to mark the 50th anniversary of the assassination of the former president, Mr Miliband said JFK - a distant relation of Harold Macmillan - had a "deep affection" for Britain.
Speaking to an invited audience at the British Library, Mr Miliband, who is now based in the US as president of the International Rescue Committee, said: "He saw the assets that Britain brought and should still bring to the European project. I have no doubt he would want us there still.
"Sitting as I now do in New York, there is bafflement at the idea that Britain might leave an institution that costs £1 per week per British citizen - and never mind the indirect benefits the CBI has talked about.
" It is taken as unhappy proof that we are thinking about opting out of the 21st century.
"The warnings to Euro-sceptics from political and business leaders could not be clearer: opting out of Europe is your choice, but if you do that then you count yourselves out of the Transatlantic partnership too.
"The message is simple: be very careful. You may end getting what you want and finding it was not what you wanted after all."
Asked in a question and answer session after his lecture what JFK would have thought of referenda - and what Mr Miliband himself thinks of the referendum over leaving the EU - he joked that in his research, he was "relieved" to find that Kennedy had no views on the matter at all.
He added: "I'm in the happy position to be able to say I support the Labour party position on this - if there is a fundamental shift in the balance of power between Brussels and Britain then there is an argument for referendum."
It is vital that there is not a division in Europe between those for and against the Euro, said Mr Miliband.
"JFK would argue that although the collapse of the euro would be a disaster for Europe, Europe is about so much more than the euro," he argued. "In other words, JFK would surely be strongly opposed to a 'two-tier' Europe and make the case for an expansive European agenda for 28 members of the EU, not just 17, led by a strong European Commission.
"This means a deeper and stronger single market, consistent with Prime Minister Cameron's speech in January 2013."
Mr Miliband, who studied in the US as a Kennedy scholar, stressed the importance of greater international co-operation during his half-hour lecture, saying: "Since JFK left office everything has changed but one thing has stayed the same.
" Kennedy's great insight was to know that we can live together better and more peaceably if we find ways to co-operate. Through common institutions we come together. We talk, discuss, and find ways to live in this world that technology and mobility is making smaller."
He said that his current agenda as president of the IRC included dealing with the fallout from the Syrian crisis.
"There are 300,000 Syrian children in Lebanon without education," he said. "Syria's refugee crisis - with over two million expelled from the country, five million displaced within it, neighbouring countries buckling under the strain, populations inside the country cut off by the fighting - is the defining crisis of our times."
Asked what JFK would have done about the use of chemical weapons in Syria, Mr Miliband said he believed the former US president would have tried to find a diplomatic solution - as with the Cuban missile crisis.
However he added: "One point relevant to that is that with Russia then, and Russia now, you have got to get their attention - and one way to do that is through military action.
"I don't think that Russia would have moved in the way that they did if America had not been threatening military action as they did."