The Foreign Office I joined, 50 years ago, deserved Dean Acheson's jibe: we were losing our empire, with the failed 1956 Suez invasion killing some post-imperial pretensions, but had yet to find a new role. De Gaulle had rebuffed the Macmillan and Wilson attempts to correct our mistaken decision to walk out of the 1955 Messina Conference, which laid the foundations for the European Economic Community. We thought we were losing the Cold War, with Soviet and Chinese communism vying for Africa and South-East Asia, Germany divided and Moscow controlling half of Europe, and the UN Security Council blocked by the Soviet nyet. The Foreign Office was split between Atlanticists and Europeans, with EEC expertise largely confined to specialists in economic relations, then seen as a second class cadre. The separate Commonwealth Office felt slighted and unloved.

The Foreign and Commonwealth Office I left, 15 years ago, had learned that being influential in the EU strengthened our voice in Washington, in the UN and in the Commonwealth. The split in the Service between economic and foreign policy specialisms had healed; my predecessor and successor in Washington had, like me, worked on European economic issues. The British at last felt at home in a Brussels where English had become the common language, where the Brittans, Kinnocks and Pattens held the key portfolios, where we had more senior jobs in the institutions than any other member-state, where Margaret Thatcher’s single market concept was slowly but steadily becoming reality, and where British and French foreign policy expertise was seen as an EU asset. In Washington we were regarded as good guides to EU outcomes, and capable of delivering on our predictions: our access to top US policy-makers reflected respect for our leading role on EU external issues.

Some of this has since gone. Disasters in the Middle East, together with cuts in defence and diplomacy, have weakened our capacity to lead. In Europe, we have chosen a certain self-isolation. The euro, Schengen, bail-outs, banking union, refugee resettlement: while boasting of non-involvement and having the best of both worlds may work well at home, greater sympathy and solidarity with the rest of Europe would have better underpinned a leadership role in Brussels. But much more is now at risk. We are at a watershed moment, and would do well to stand back and assess the referendum’s possible fallout on Britain’s foreign policy, which rests on four pillars.

We are at a watershed moment & need to assess the #EUref's possible fallout on UK's foreign policy

The link with Washington is fundamental. The values set out at Philadelphia in 1787 were those of the English and Scottish Enlightenment: Benjamin Franklin lived in Samuel Johnson's London and knew David Hume's Edinburgh. Britain at its best is in step with America at its best. That would not change if Britain leaves the EU, despite current trumpery on both sides. But influence on American policy is a function, not of sentiment, but of perceived power. We are useful to the Americans to the extent that we can convince or cajole our other friends to adopt common or at least congruent policy. We cut ice in Washington when we are seen to cut ice over here; to cut ourselves off from our continent would see us cut down to size – 60 million, not 500 million – in the US. No wonder the transatlantic foreign policy community overwhelmingly hopes we will vote to stay.

The second pillar is NATO, the common defence structure to which we would commit all our forces, pooling all our sovereignty, in time of war. The alliance is now thinly stretched, with a revanchist Russia occupying Crimea and the Donbass, and threatening the Baltic States. Our defence cuts have gone deep, and lower economic growth post-Brexit could mean their going deeper still. Effective Western soft power would certainly be damaged. German reticence about armed deployment, and French unease about US-led command structures, have meant that it has often fallen to Britain to forge the link between NATO and soft power decision-taking in the EU’s Council of Ministers, delivering EU influence, aid and diplomacy to support common Western aims. The key multilateral actors have often been British; Peter Carrington, George Robertson, David Owen, Paddy Ashdown, Chris Patten and Cathy Ashton. In the Council of Ministers that I knew best it was to Douglas Hurd that the Juppés and the Genschers turned at key moments; it was John Major who in a morning swung the whole EU behind his 1991 initiative to provide a safe haven for the Kurds. If the British weren't there that couldn't happen, and the North Atlantic Council and European Council would drift further apart. Of course the EU would still talk to us, but their decisions would be taken in an EU formation, with us excluded. No wonder the defence establishments on both sides of the Atlantic hope we will stay. Our leaving would hurt NATO and Europe’s security.

Pillar three is built on the lessons of history. Chamberlain was wrong to accept the annexation of the Sudetenland in 1938; it is not in our interests to regard our neighbours as far off countries, of whom we know nothing. Distracted by Suez, we did nothing to help the Hungarian rising against Soviet rule in 1956. I was in Moscow in 1968 when, tacitly accepting the Brezhnev doctrine that Soviet rule was irreversible, we did nothing to help Czech reformers. That's why I was proud to serve later governments, of both parties, who successfully championed EU enlargement, delivering on Thatcher’s 1988 Bruges speech, with its call for an opening to the East.

In the year of the centenary of the Battle of Somme, some seem to have forgotten that stability and prosperity in Central Europe is a vital UK interest. And a few days ago, a British defence minister, Penny Mordaunt, insulted a key ally, Turkey, claiming that unless we leave the EU Britain will be over-run by Turks, and Turkish criminals, by 2020. Surely she must know – everyone else does – that Turkish accession to the EU is (sadly) many decades away; it depends on Turkey solving myriad internal problems; and it can be vetoed by any single member-state? Surely she must know – everyone else does – that the only question for now is whether Turkey should join the list of countries with visa-free access for short-term visits to the Schengen area, with no right to work or stay; and that, since we are not in Schengen, we are in no way affected? Lies like these demean the debate and damage the UK’s interests. But the key point is that an EU without us, or at least without a Britain true to itself, would be less open, less liberal, less secure, less aligned with British values and interests, properly defined. No wonder our true friends in Europe hope we will stay.

An EU after #Brexit would be less open, less liberal, less secure & less aligned with UK interests

Pillar four is the belief that a rules-based multilateral order serves our interests and should be sustained. That order is built on the rule of law, the United Nations, the Bretton Woods institutions and on aid and trade structures optimised to support economic development. If we left the EU, its aid programmes would be smaller, and probably less focussed on our friends. More important, developing countries' access to EU markets would probably develop more slowly, particularly for those with the closest ties to us. In his eccentric recent intervention on bananas, Boris Johnson clearly forgot that the origin of the Brussels banana wars was a successful UK drive to maintain Caribbean countries' preferential access to the EU market. The 1999 EU trade agreement with South Africa was negotiated by a British Commission official, backed by London, and resisted by much of southern Europe.

Looking beyond trade, our ability to help defuse threats of conflict – whether on Iran's nuclear programmes, Indus waters or the South China Sea – would decline. Why should Iran, India, China or the Security Council listen to us if our influence in Europe and hence on America has shrunk? No wonder our Asian friends, and our Commonwealth friends – most recently Canada’s prime minister, Justin Trudeau – have said they hope we stay.

My thesis is that the four pillars of our foreign policy are mutually reinforcing. If one goes, all are weakened. That is why next month's vote is so crucial, and not just for our prosperity. Our influence across the world would shrink and our friends and allies believe that their interests would suffer, if we were to find ourselves outside, with, in Stephen Wall's phrase "our noses pressed to the European glass, gesticulating, unheard, to those inside".

As Boris Johnson said, in 2012, "supposing Britain opted to come out, what would actually happen? You would still have huge numbers of staff trying to monitor what was going on in the (European) community, only we wouldn't have any vote at all. Now I don't think that's a prospect that's likely to appeal." For foreign policy and other reasons, I sincerely hope his prediction proves right, and I'm sorry his own views have changed. Even Macbeth, contemplating regicide, knew that vaulting ambition can o'erleap itself.

Lord Kerr is a former British Ambassador to the EU and to the US. He is the chairman of the Centre for European Reform.