“Who are you and what are you doing here?” is not really how I’m used to being spoken to when on mission, but I wasn’t going to argue with four men each with a casually slung Kalashnikov to make up for, or perhaps bring on, the lack of manners.

I was outside Kelibia in far North East Tunisia, on a beautiful sandy beach just up from an evidently pretty upmarket Tunisian holiday destination. With azure blue sea and palm trees, it could not have been more idyllic. But I was there with a more sobering mission, to see how the migrant and refugee issues are impacting upon the still fragile democracy in Tunisia, and see for myself the beach where an estimated 28,000 Tunisians have embarked since 2012, aiming for the Italian island of Pantelleria, just visible on the horizon. One thousand five hundred of those didn’t make it, and the Tunisian government has just announced a year-long public inquiry into this national tragedy to try give their relatives some sort of closure.

I think the biggest issue facing the European Union as a collective is the migrant and refugee crises. Note, two crises, both of them different and needing different solutions. Refugees are defined in Article One of the Geneva Convention as anyone who "owing to a well-founded fear of being persecuted for reasons of race, religion, nationality, membership of a particular social group or political opinion, is outside the country of his nationality, and is unable to, or owing to such fear, is unwilling to avail himself of the protection of that country."

Each state has a duty to look after people fleeing immediate harm, though in Tunisia now the issue is emphatically not refugees. According to the UNHCR who I met in Tunis, barely 928 people are looked after by the UN agency as “persons of concern” in the country, and it is clear that refugees are instead now transiting through the chaos that Libya has descended into instead, a longer and far more perilous crossing. Instead the issue is the thousands of mainly young and ambitious Tunisian men who seek to leave Tunisia for Europe’s shores as economic migrants.

I met with fishermen, port officials, four other sets of men with guns, and the people who actually take the boats. Nobody is walking around wearing T shirts with “I am a people trafficker” on them; the informality of the sector is the problem in regulating it. A passage on a boat costs around 1,500 Tunisian Dinar, around five hundred pounds, and a full boat and successful night’s crossing is worth around 5 months’ wages to a fisherman. The economics are inescapable.

In the part of Tunisia where I was, almost every family has at least one member over in Italy or France. The town is littered with ostentatious houses, built by returning migrants having made it big in Europe. Often the cost of the crossing is paid for by the family of the individual themselves, and there is a real pressure to go and do well. But it is not just pressure to go; there is little to stay for. According to Tunisia’s National Institute for Statistics, unemployment among Tunisia’s 15-24 year old men was officially 37.6% in 2012, with the position thought to have deteriorated since.

“My mother paid for my crossing. It took me two weeks to tell her the boat had sunk,” said Karim, who had attempted the crossing some months before and is currently working part time clearing dishes in a restaurant. He speaks good French, is personable and hard working. He is one of the lucky ones to have made it back to shore.

I hate the demonisation of migrants that we have seen from some politicians and commentators. I like to think we are a bit more humane in Scotland, but perhaps I’m basing it too much on personal experience.

In 1979 my dad, like many Scots, was made redundant, and had to take a job in Saudi Arabia where we spent the next eight years, as migrants. There’s barely a single Scottish family that didn’t grow up sending the Broons or Oor Wullie Annual to far flung loved ones, economic migrants all, in Canada, Australia, New Zealand or elsewhere. Obviously, refugees are fleeing immediate harm and we need to find ways to make them safe, but we also need to collectively find a better way to deal with migrants, as the economics are simply too strong. No amount of razor wire, gunboats or red tape are going to stop people like Karim trying to better himself and his family.

Sadly, it is exactly the gunboats and razor wire approach the EU is taking. Operation Mare Nostrum was a joint EU, Italian led operation to save people at sea, which was superseded by Operation Triton, which has just this week been replaced with Operation Sophia - ironically named after the Goddess of Wisdom but I’m not convinced we will see much wisdom on the ground and in the seas.

Operation Sophia is much more about rebuffing the people our own Prime Minister has described as a “swarm” and our own Home Secretary caught out in an outrageously misleading dog whistle speech to her own Tory conference last week.

“The EU is engaged not to save people but to stop people,” said the head of the Tunisian Forum for Economic and Social Rights, an organisation that produces an annual report on missing migrants. It was a common accusation, and one I heard regularly from numerous quarters. There is less and less goodwill amongst Tunisians in authority and on the street to see the world through the EU’s preoccupations.

And we need to get to grips with this, because if we think we have a problem now we’re really not looking ahead.

According to the International Organisation for Migration (IOM), barely 110,480 people arrived in the EU by sea in 2015, overwhelmingly to Greece and Italy. Let's get real, across the EU as a whole these numbers are entirely manageable. But, it is only going to get worse as climate change wreaks havoc in Sub-Saharan and North Africa. Just this week the World Bank and IMF in a joint report concluded that: "large-scale migration from poor countries to richer regions of the world will be a permanent feature of the global economy for decades to come."

If the EU does not invest in the economies and stability of our nearest neighbours then we can hardly blame people like Karim for voting with their feet.

Alyn Smith is SNP MEP and a full member of the Foreign Affairs Committee