Last year I was asked on a panel what I believed was the greatest threat to the safety and security of this country.

I considered some of the immediate and looming challenges and threats and they are pretty formidable. The migration flows which have suddenly appeared on our shores, the spread of religious extremism and jihadi violence plumbing new depths in savagery, a restive and resurgent Russia, a rising China and the disruption of North Korea. Add to that fragile and failed states spreading mayhem across borders, intra-nation conflicts, climate change, cyber warfare and the global proliferation of lethal technology and weapons from handguns to ballistic missiles. And there is the rise and dominance of organised crime, population growth, pandemics, and financial instability.

That’s quite a formidable cocktail of trouble for us to face. But my answer to the question of what is the greatest threat is different. It is ourselves.

WE are our own worst enemy.

We are short-sighted, penny pinching, naively optimistic, complacent and ostrich-like to the way in which the world has become more interconnected, more fragile, more unpredictable and more incendiary. We are grossly unprepared and under resourced to meet the challenges of the coming years. And these threats are potent, deadly and some are very, very urgent.

At the end of the cold war I made a speech at Chatham House in which I coined what was to be a much quoted phrase when I said that there had been a 'bonfire of the certainties'. The fall of the Berlin Wall had unleashed a flood of optimism which had overnight made Kremlinologists redundant, and robbed us of the, albeit dangerous, manageability of the Soviet/West confrontation. Some were rash enough to call it the ‘end of history’ but then all of us grabbed a hefty peace dividend – substantially cutting defence budgets in the five years after.

I believe that we are now seeing another bonfire – this time of the post-cold war certainties – and in doing so we have left ourselves vulnerable and unready. Just look how we have responded to this new world of regional conflicts, violent civil wars and the other manifestations of the turmoil I have already listed. It hardly measures up to the scale of what faces us. If anyone doubts my contention that the greatest enemy we now face is us, just let them look at the debate on Syria in both Houses of Parliament on 29 August 2013.

The president of the United States had drawn a red line on President Assad using chemical weapons on his own people in a conflict spilling into every part of the Middle East and beyond. Consequently when the Sarin gas attacks on civilians were confirmed, President Obama decided that a military attack should be mounted to degrade Assad’s war machine. Our prime minister agreed, said he wanted to join the wholly justified action, and recalled parliament to put it to the House of Commons.

The House of Commons, with my own party playing an opportunistic and disgraceful part, refused to give permission for the UK to join the response to the hideous chemical attacks on civilians. The prime minister, having been defeated on an issue of grave military consequence, not only did not resign as one might have believed the honourable response to be; instead, he swiftly closed off the possibility of even reconsidering the decision.

It did not need John Kerry, the formidable but sadly outgoing US secretary of state to lay the blame for President Obama’s retreat from his red lines on the British House of Commons on that August day. We all know it and we must all share in the responsibility – even those of us who supported the government position – for the carnage which followed. Tears for Aleppo will never be enough.

I love my country. I care about its future and the safety of our people in a troubled world. That is why I was ashamed of my parliament that night; and as events spiralled into the horrors since then my shame has turned to anger. And now, tomorrow, we will have President Donald Trump as the leader of the Western world. The Donald, with his Mexican wall, with new protectionism and isolationism, with his serious questioning of NATO solidarity, with a belief in torture, and with Lt General Michael Flynn as his key security adviser. I ask you. Who needs enemies?

And we in our country have Brexit. Going against the grain of history, our country is about to embark on a tortuous journey with no known destination, which will absorb people and time and talent and suck the energy out of our political system just as the challenges to Europe come crashing in. The deluded fantasy that we are bringing ‘back control’ will quickly evaporate as reality hits the Brexiteers’ unfounded optimism.

Our influence on our European neighbours will dramatically and inevitably diminish and although they will still need our military as Europe finds Trump’s America turning away, we will find it difficult to take the lead we used to claim. Reports this week that Britain’s claim to the Deputy SACEUR position is being challenged by France is just the latest evidence of the slip in influence.

Our Foreign Office, the soft power arm of government, will at the same time as bearing the burden of maintaining our influence in the rest of the world be eclipsed by the Brexit vortex, as its budget, already smaller than that of the US embassy in Baghdad, will come under renewed pressure.

In our crazy complacency, we seem oblivious to the fact that the relative peacefulness of the world today, as we look over the new precipice, has been achieved by our nuclear deterrent and by our institutions and processes which require diplomacy, intelligence, involvement and crucially, decisive interventions.

Where will the space be left for all that as we paddle through the treacle of unravelling over 40 years of integration?

Confirming that we are our own enemy is the attitude to spending on defence and security. Yes, we are spending the NATO target of 2% and we crow that we are among the few who do. Good, so far as it goes, but wait. Have we stretched definitions to get to 2% and are we not confusing percentages with capability? And who can doubt that the Brexit devaluation of the pound will now have a serious effect on the defence budget. In 1997 and 1998 – as secretary of state for defence – I led a strategic defence review which radically remodeled and modernised our post-cold war forces.

In the preface to the review I said this:

These (post-cold war) problems pose a real threat to our security, whether in the Balkans, the Middle East or in some trouble spot yet to ignite. If we are to discharge our international responsibilities in such areas we must retain the power to act. Our armed forces are Britain’s insurance against a huge variety of risks.

That is as true now as it was then. The question is whether we in this country have retained that 'power to act'.

Of course, there is formidable hardware in the pipeline from Trident to the Carriers, which were the centerpiece of my 1998 review. But the question remains. Is this enough to meet the challenges we are facing and when so many of them are so urgent and so potent?

My worry is that we are sleep-walking to a potential calamity. My depressing catalogue of threats, after all, does not even take account of what I said in 1998 of ‘trouble spots yet to ignite’. As I wrote these words we could not have foreseen the conflict the very next year in Kosovo, the attacks of 9/11, the implosion of Syria, the whole Arab Spring and the emergence and rise of Daesh/ISIS.

We have today a crisis of optimism: hoping for the best and failing to prepare for the worst.

But, you might ask, after this gloomy assessment and warning, what should we be doing? Here are a just a few of my thoughts.

First we must retain and protect our own defence industrial base. That gives us real control in the UK. At the same time we must encourage and participate in joint projects with our European NATO allies. European contributions to NATO are not just limited by financial shortcomings but by wasteful duplication. European allies must boost spending and capabilities.

Second, we must continue to promote our values and principles on the world stage. We must defend NATO as the cornerstone of our national and collective defence and tell the people of this and other countries how valuable and essential the Allliance remains. Article 5, where an attack on one is an attack on all, is not a choice; it is a solemn obligation. And our communication policy on this is, frankly, pathetic.

Third, we must be aware of and act on the dangers inherent in the present confrontation between Russia and the West. Without the trip-wires and warning arrangements of the cold war we are in grave danger of a mistake or a miscalculation with potentially catastrophic results.

Our much reduced military is still among the very best in the world. Our diplomats have few peers internationally. Our intelligence services are relied on by most of the free world. It is now time for our government to recognise the dangers to Britain and to live up to their high standards. Never was bold and courageous political leadership more necessary.

Lord Robertson of Port Ellen is former secretary of state for defence and former secretary general of NATO.