Eighty years ago, the start of the second world war saw Nazi Germany invading Poland. Six years later, up to 85 million people were dead. I’m in Poland this weekend to commemorate the start of the bloodiest war in human history.

An entire generation of brave men and women around the globe sacrificed everything to defeat the singular evil of Nazism and fascism.

We should be proud of Britain’s role in winning the war, but also in helping to build the peace that followed. A whole generation – both here and around the world – were determined that never again must we repeat the horrors of the 1930s and 1940s. This laid the foundations in the years after 1945 for more than seven decades without another world war. And it is now to today’s generations – inheriting the better, safer world envisaged in 1945 – that future peace and prosperity is entrusted.

With the numbers of those who remember that dark period dwindling by the day, fewer survive to tell their story and to warn current generations of the lessons from history. Worryingly, these warnings are increasingly pertinent. For the first time in more than 70 years, it seems the lessons of the second world war are genuinely at risk of being forgotten or, worse still, being rewritten.

The EU and Nato, so instrumental in preventing another bloody world war, are facing unprecedented attacks – often from leaders of the very nations that helped create them. Support for democracy is at a record low across the western world, and the values that define liberal democracies are under siege – from the rule of law and the independence of the judiciary, to a free press and a vibrant civil society.

Vulnerable, often minority, communities are being demonised and scapegoated for all society’s ills. And, in appalling new parallels with the horrors of the past, migrants, refugees, people of colour, LGBTQ+ and Jewish communities are bearing the brunt. This comes as a new wave of extremist far-right movements and political parties are winning power and influence at alarming speed – fuelled by Donald Trump, the global poster-boy for white nationalism. Politicians across Europe are following his example by seeking to exploit division to gain power – from Matteo Salvini in Italy to Marine Le Pen in France.

I am not saying we are reliving the 1930s but the warning signs are there. If we act now we can ensure a different path

Hungary’s Viktor Orbán has systematically destroyed the independence of both the judiciary and the press, institutions that are also under daily verbal attack from Trump and other far-right leaders around the world. The impact can also be seen in the UK, where the outsize influence of Nigel Farage and his Brexit party has pushed the Conservatives, under Boris Johnson, to become ever more rightwing, illiberal and intolerant. Just last week we saw the disdain Johnson has for parliament and our democracy.

It is a privilege and an honour to be in Gdansk this weekend to attend the second world war commemoration, at the invitation of the city’s liberal mayor, Aleksandra Dulkiewicz. But Poland faces similar threats. The Law and Justice party (PiS), which governs nationally, has become increasingly far-right in recent years. It has allowed “LGBTQ+ free zones” to be declared in more than 30 towns and cities. The Polish government – at a time when antisemitism is on the rise – recently sought to make it a criminal offence, carrying jail time, to accuse the nation of complicity in Nazi war crimes. While I am not saying that we are reliving the 1930s or that another conflict is inevitable, alarm bells should be sounding. However, if we act now, we can ensure a different path is taken.

Mainstream political parties on both left and centre-right have a crucial role to play and a huge responsibility to show genuine leadership. Both must reject, outright, the scapegoating of vulnerable communities for short-term political gain and rid our political dialogue of this divisiveness.

Those spreading fake news in order to divide us must be challenged. And underlying causes of public discontent need tackling – a task that requires renewed global coordination to meet the economic, social and environmental challenges that are creating a breeding ground for the far right.

This means recognising that economic inequalities between countries – made ever worse by the growing environmental catastrophe facing our planet – have contributed to the global migration crisis and cannot be tackled by any one country in isolation. It means tackling the frustrations of the growing numbers within western countries who have been left behind by globalisation, fuelling resentment. And, crucially, it means fighting against those trying to rewrite the darkest period in human history for their own political purposes.

All this will require the UK to work more closely with other countries, not less. Instead of pursuing Brexit and poisoning our relations with the rest of the continent, we should be exercising our soft power and showing leadership in the fight against the far right.

I’m proud to be mayor of the most outward-facing, international and tolerant city in the world, with strong links across Europe and the globe. But I also know that without the sacrifices of those from all continents who fought in the second world war, London’s history could have been very different. So we have a special responsibility to honour the memory of all those who sacrificed so much to protect us all those years ago – by defending the ideals they died for and ensuring the more peaceful and stable world they built lasts for generations to come.