Image caption In its heyday, Lossiemouth harbour was home to 90 working fishing boats

What do the prospects of Brexit mean for Scotland's Eurosceptic nationalists?

In the harbour at Lossiemouth, you can still see signs of its fishing industry - the buildings that housed a daily fish market, the two basins once packed with up to 90 working boats.

These days, it is mostly pleasure boats in the harbour and visitors enjoying the sandbanks or sheltering from the brisk wind in the cafes that cater for tourists to this beautiful, if bleak, stretch of coastline.

John Thomson has no doubt what is to blame for the sorry state of his former industry, one which used to employ 500 people in the town - the Common Fisheries Policy of the European Union.

So far, so predictable - it is a story I've heard from fishermen and their families many times, in the south-west of England and now here on Scotland's north-east coast.

What is different, though, is that Mr Thomson, who first fished these waters more than 60 years ago and is a lifelong Scottish Nationalist, is delighted at the prospect of Brexit.

"There's people going about in high office still trying to reverse that decision," he says. "Well, they had better not try."

We are used to thinking of the SNP as a pro-EU party.

Its leading figures campaigned for Remain in June's referendum, and it is true that Scotland, where 62% voted to stay, is the most pro-European nation in the UK.

Image copyright David Cheskin Image caption Former SNP leader Gordon Wilson says the party has always had Eurosceptic members

Yet as Gordon Wilson, who led the party for just over a decade, told me on The World This Weekend earlier this year, the SNP has a strand of Euroscepticism in its make-up.

"Back in the 1970s, they were strongly anti-European," says Pro Michael Keating, from the University of Aberdeen, who is director of the Centre on Constitutional Change.

The SNP was in favour of leaving Europe in the 1975 referendum.

Partly, Prof Keating says, this was to do with fishing and farming, but there was a more fundamental argument, one to do with the philosophy of nationalism.

"What is the point in getting out of the UK if you're going to give your sovereignty over to Brussels instead?" he says.

The official position shifted in the 1980s, but in Moray, of which Lossiemouth is part, you will find SNP members who still hold to that view.

Voters, too, judging by the referendum result.

In Moray, the Remain campaign prevailed only by the narrowest of margins, 122 votes.

Paul Briggs was among the Leave campaigners.

He is a former SNP press officer, though insists he came under no pressure to conform to his party's prevailing pro-Europe position.

When I ask him how he feels about First Minister Nicola Sturgeon's determination to keep Scotland in the EU, he grins broadly.

"I think there's more to this than meets the eye," he says.

"It's all about getting Scottish independence, that's the way of going forward to open the gates of Scottish independence."

Image copyright Getty Images Image caption North East Fife MP Stephen Gethins says Nicola Sturgeon's support for the EU is genuine

The implication is pro-EU rhetoric is more about creating a justification for a second referendum on independence than an abiding passion for Brussels.

Stephen Gethins, MP for North East Fife, denies this.

The party's spokesman on the EU at Westminster, he says the commitment to remaining is genuine, because "the EU is a club for independent, sovereign nation states".

How does he answer people such as Mr Briggs and Mr Thomson, members and supporters of the SNP, who think the European Union has done real harm here, especially to the fishing industry?

"When we entered the European Union," he says, as he acknowledges the failure of the Common Fisheries Policy, "it was the UK that referred to the Scottish fishing industry as being 'expendable'."

When I query his reference, he tells me it is to be found in files released under the 30-year rule.

Mr Gethins argues that because two-thirds of the industry was in Scotland, the Westminster government had delivered a particularly poor deal for his part of the country when it negotiated membership in 1972.

Image copyright Getty Images Image caption In the EU referendum, Scotland was the most pro-European nation in the UK

Back in Lossiemouth, I ask Mr Thomson if there was a second referendum and the choice was to remain in a United Kingdom leaving the European Union or an independent Scotland remaining inside the EU, which he would vote for?

"The former," he replies, adding it is a "very hard, very hard thing to say".

"I've worked and stood, represented in many ways, for the Scottish National Party - but equally for the fishing industry," he says.

He simply cannot stomach supporting Scottish membership of an organisation he blames for the loss of what was Lossiemouth's principal livelihood.

It may be that Scottish voters do not have very long to wait before they face that dilemma themselves.

Shaun Ley presents The World This Weekend this summer, on BBC Radio 4 on Sundays at 13:00, and available afterwards on the BBC iPlayer.