JUST over a year ago I stepped down as foreign secretary. As I reflect on my time in that great office of state, what is the biggest thing I learned?

When I grew up in Surrey in the 1980s my dad was a naval officer who spent his life planning for possible Soviet attacks during the Cold War.

While thankfully we never had an actual conflict, we now know we came pretty close.

Indeed, it has recently emerged that one of greatest heroes of that era, Russian double agent Oleg Gordievski, may have averted an accidental nuclear war when he alerted us to an erroneous Russian fixation that the West was about to launch a nuclear first strike.

What was clear for anyone growing up then was that Western liberal values – democracy, the rule of law, individual rights – could not be taken for granted. If we wanted to protect them, we had to defend them.

As foreign secretary it became clear to me that after a lull, following the fall of the Berlin Wall, that same battle of ideas is recommencing.

At some stage in the next 20 years, for the first time in our lifetimes, the largest economy in the world will not be a democracy.

When China overtakes the United States, its GDP per head will still only be one quarter of that of the US – and no-one thinks it is planning to stop growing then. China’s growth – spectacular to date – has only just started.

When you look at the suppression of free speech in Hong Kong and the treatment of the Uighurs, it is clear China is a country that does not share or aspire to our own values.

But it would be a very grave mistake to treat China as another Soviet Union.

The main reason the West prevailed in the Cold War – apart from the resolve of Margaret Thatcher and Ronald Reagan – was the bankruptcy of the Soviet economy. That is not going to happen this time.

So we need to find a way to co-exist with a large and powerful country – but in a way that does not threaten or compromise our own values.

And there is only one way to do this – by standing together with other democracies.

It is the urgent need to rebuild a tattered Western alliance which was the main lesson I drew from my time in the Foreign Office.

NATO has in the past few years seen its very existence called into doubt by an American president – but we should not delude ourselves that this is a Trump idiosyncrasy.

When the US taxpayer is funding around one-third of the cost of defending Europe, the imbalance in our contributions to global security will rankle with any occupant of the White House.

We also need to pay special attention to our relations with EU countries following Brexit – they, too, are hugely important supporters of democratic values.

We will need, too, to strengthen friendships with traditional allies such as Canada, Australia, New Zealand and Japan, as well as build new alliances with friends in Africa and the developing world.

South West Surrey sits on the edge of one the world’s greatest global hubs. We share many of London’s cosmopolitan values.

Wherever we stood in the Brexit debate is irrelevant – the need for an outward-looking and positive approach to Britain’s relations with the world is not just about us – it is about defending the democratic values we all hold dear.

All of us must play our part.