Image caption Alyn Smith was a candidate for the deputy leadership of the SNP last year

An SNP MEP has called on the party to ban members from running "unpleasant" anonymous social media accounts.

The measure is among proposals put forward by Alyn Smith in an attempt to reduce online tribalism and abuse from across the political spectrum.

He said the SNP should create a code of conduct on social media use that all members had to agree to.

And he urged the country's other political parties to introduce similar rules for their own members.

Speaking to The Herald newspaper, Mr Smith said: "I would like to see a specific code of conduct in my own party with four or five simple points that everyone agrees on, including a ban on the kind of anonymous accounts which seem to enable people to be so unpleasant.

"I also think all the parties, either through their leaders or their chief executives, could sign some kind of code of online decency.

"As an out-gay pro-European nationalist I am no stranger to abuse but I am fed up of whataboutery from one side or another."

'Extremists and blowhards'

Two newly-elected Conservative councillors - Alastair Majury and Robert Davies - were suspended by the party earlier this year over abusive sent from anonymous Twitter accounts.

And during the 2015 general election campaign, SNP candidate Neil Hay was named as the person behind the abusive Paco McSheepie Twitter account.

Mr Smith's call for a ban on anonymous accounts followed an article he wrote for the Sunday Herald in which he argued that the "edges" of online political activity in Scotland had "turned into tribalism, or worse, sectarianism".

He said there was a widespread attitude that "everything my team says is correct and anything your team says is a cynical distortion of the truth".

And he added: "I think there is also the proven tactic of using abuse to shut down debate (I am looking at you, President Trump) being practised in Scottish cyberspace too.

"If the extremists and blowhards polarise discussion and drive regular folks offline, we all lose.

"Debate, by all means, ridicule, certainly, but how about all of Scotland's politicians stop trying to divide the world into goodies and baddies and urge our supporters to do likewise?"