I WAS in Poland last week to deliver the Natolin lecture, and the place has gone from strength to strength since I was a fresh-faced Erasmus student back in 1995. We were the first year fully in Warsaw, and the air was fizzing with energy. The initial euphoria of the Berlin Wall crashing down and Poland regaining freedom from the USSR had worn off, and the hard job of building a nation was under way.

Now, we live in turbulent, unsettling times ourselves. The world is an unstable place, and we’re facing challenges that are bigger than any one country. Muscular Russian foreign policy, a refugee crisis displacing hundreds of thousands of desperate families and climate change on the way to rendering swathes of the world uninhabitable, to name but a few.

Against the developments of the last few days, the UK’s Brexit vote seems an ugly, grubby, thoughtless act of gross narcissism, as self-indulgent as it is petty, built on a backward-looking delusion of British exceptionalism, political cowardice and complacency and no small amount of lies.

But it is also, let’s be frank, a slap in the face of anyone who thinks the EU is doing well in the eyes of the people the EU serves. I see exactly the same ingredients of Brexit in all EU countries. We can’t just dismiss uncomfortable arguments or criticism as ignorant populism.

Multilateralism and co-operation must be explained, justified and defended, because – make no mistake – they are under threat. Now’s the time to pick a side and decide what kind of country we want to be.

We have a clear sense of our own identity, our place in the world. We have always, despite geography, been European in outlook. In 1297 William Wallace was appointed as Guardian of Scotland, and his first act was to write to the Hanseatic League the letter of Lubeck, proclaiming that Scotland was open for business and wanted to trade with them.

Fast-forward a few centuries and it’s 2014. In the Scottish independence referendum, our definition of "Scottish" is “Do you live in Scotland? Aye? Alright then.”

We reject any idea of ethnicity, religion or history in our national identity. We’re a proudly mongrel nation, and if you’re in Scotland you’re part of our community now and welcome to be part of our community’s future. So all EU citizens resident in Scotland had a vote in our independence referendum.

Compare that to the EU referendum, where the UK Government decided we were going to have a debate and a vote about the rights of 2.6 million EU nationals living in the UK, but denied them a vote because “well, you’re not one of us are you?”

I did 40 public meetings up and down Scotland, arguing that Scotland’s best interests, even short of independence, are best served within the EU. But the campaign UK-wide was shrill and ugly, with few facts and even fewer positive visions of a future. The Leave side successfully tapped into the genuine anger that exists. We see it not just in the UK, discontent about the economy, out-of-touch elites, globalisation or automation changing how we work, immigration – you name it, the Leave campaign blamed it on the EU.

The Leave campaign threw up such a blizzard of promises and assertions they ended up saying anything to everyone. Now there’s chaos, and we need to find solutions. And these solutions need to be based on decent, humanitarian values.

The Scottish Government has published a very serious options paper, setting out the circumstances we see as “less bad” than the hardest of hard exits the UK Government seems keenest on. We want the UK to remain within the single market and are urging that, but if that is not possible, there is going to be an exceptional status for Northern Ireland, and Gibraltar, so we want a distinct status too with our preference being European Economic Area membership for Scotland. There are practical issues to be overcome in that, but, I firmly believe, nothing that cannot be overcome with sufficient goodwill.

This discussion within Scotland and within the UK is not happening in a vacuum. The reaction of our European friends is crucial. Theresa May is a weak Prime Minister, hostage to her own extremists, and the UK is a lot more diverse than the UK Conservative party.