THE last years have been a rollercoaster for the nation but also for me personally. The EU referendum was our fourth national vote in 21 months, with the energy from the 2014 independence vote still buzzing around and making the EU ref all the more other-worldly by comparison. In the last few months we have seen the worst of politics and politicians, but we have seen the best of the people of Scotland and the SNP membership.

I was one of the few people carefully watching the series of miscalculations and mistakes that led to the EU ref playing out like a slow-motion trainwreck, with a deeper and deeper sense of dread. There are still some days I wake up hoping I’ll find Bobby Ewing in the shower and that the last few months never happened. To be sure I’ll then be curious how on earth Bobby Ewing got into my house, but I’d rather have that dilemma than the mess we’re all in now. But I’m content I did all I could. I decided early on that if I’m going down I’m going down fighting, and as I did my national tour of 40 public or party meetings there were plenty of lighter moments. I’m at my happiest with the grassroots of the party. And we won, in our country, with a results map that (despite a few near misses in a few places) is unanimous. Scotland voted to Remain and we expect something different.

And as I travelled the length and breadth of Scotland, as I have done since I was elected to represent the entire country in 2004, I was struck to find that the SNP is in great shape, but there are things we need to do to prepare ourselves for the challenges ahead. What is clear is that we’ve never had more resources, more support and more people. We are not short of members wanting to do things, and we need to reach out and activate every resource everywhere. Not all Scots are SNP members, nor voters, nor pro-independence, nor indeed pro-EU, but everyone is looking to us for leadership. We will not let Scotland down.

The European question is now the defining issue of our times, and of independence. Scotland’s place in the world is what motivates me – that and the fight against poverty, which is the deep unfairness that holds our country back and so many of our people down.

I do Europe. I do international. Last week I blew every door across Europe wide open. I’ve shown you what I can do. Whatever the future holds, we need to learn the lessons of 2014. We did not properly prepare the rest of the world for what we are about. We spent too much time on the London diplomats and the London correspondents, and they viewed us with London’s baggage. We need to use Brussels to speak to the world, and we need to go and visit capital after capital explaining Scotland’s cause. Lots of people across Europe didn’t get the “why” of independence in 2014. As Westminster descends into nihilistic nastiness, they assuredly do now. Thank goodness we have a strong squad of SNP MPs to fight Scotland’s corner. Their role in doing their best to mitigate the mess, despite their permanent minority status, will be crucial.

So it is all hands to the pump, and I think we will reach – whatever this mess turns out to be – a choice of two unions, one very unlike the other. Independence, internationalism and co-operation on the one hand, or allowing Westminster to speak for us on the other. We won the EU ref in Scotland convincingly, but it was not unanimous. There are a number of people unpersuaded of the case for Europe and we will need to defend internationalism by continuing to campaign. I have kept our online resource www.scotlandineurope.eu going and am looking at ways to crowdfund the second edition of the Wee Bleu Book to inform people how the EU works and the importance of what might be about to be taken away from us.

We will also need to build the case for independence, learning the lessons of 2014 and applying the resources we now have. We’re not short of ideas. Tommy Sheppard has been promoting some great thoughts to link the SNP and the various elements of the Yes movement.

We need to circle the wagons. We also need to work on local government, the other coming challenge with the 2017 elections.

I have spent the last 12 years as a nationwide parliamentarian working with and for the three strands of our democracy: local, Holyrood and Westminster. But where I link all three I’m independent of all, with a nationwide mandate and Holyrood the centre of my solar system.

Alyn Smith is an SNP MEP for Scotland