SECRET SNP research found the party’s uncompromising online supporters, the so-called cybernats, damaged the independence cause, one of Alex Salmond’s former advisers has claimed.

Alex Bell said internal party polling and focus groups found dogmatic online Nationalists held back the Yes movement by repelling rather than converting swing voters before the referendum.

Speaking in a debate on Scottish politics at the Edinburgh International Book Festival on Monday, Mr Bell also described the SNP government’s White Paper on independence as “drivel” and said its authors should “apologise” as it didn't make economic sense.

Read more: Nicola Sturgeon: Second referendum while I am First Minister

When the 670-page document was launched in November 2013, Nicola Sturgeon called it “the most detailed prospectus for the independence of a country that has ever been published”.

Mr Bell, the senior policy adviser to First Minister Salmond from 2011 to 2013, also predicted the SNP’s “moment” had four years left, after which the party would go into decline.

Before the 2014 referendum, the SNP was often accused of failing to act against cybernats who abused No supporters, including Harry Potter author JK Rowling, on social media.

Mr Bell said SNP research at the time found such hardline voices hindered the Yes movement, with voters preferring a realistic warts-and-all pitch on independence to a dogmatic one.

He said: “Let’s be clear. All those websites that are still functioning, all that Twitter argument, all that kind of ‘It’s just right’ [position on independence] is losing the argument.

“The SNP have this polling. They won’t, of course, tell you that. They won’t ever criticise any of that.

Read more: Nicola Sturgeon: Second referendum while I am First Minister

“But let me tell you now - if you are interested in an independent Scotland, do not go into a dogmatic argument with anyone.

“Do not support a website which adopts a hostile, provocative view of the other side, because you are losing the argument in that process.

“And when the histories are written, the polling will come out.”

Mr Bell also criticised the SNP government for failing to think long-term about the country Scotland ought to be and start nation-building.

He said: “Very little of the last ten years’ legislative programmes have nation-built.

“That is, they haven’t set a foundation for Scotland to develop into the next 20, 30 years, and do not have a supporting rationale with it.

“There is a great deal of fine words about some of those policies, about early years intervention... and now the education system.

“But I’m afraid to say that the party I’ve supported for my life time isn’t very good at delivering hard, substantial, evidence-based change."

“And that is something for those of us on the Yes side to look at.”

Read more: Nicola Sturgeon: Second referendum while I am First Minister

Labour peer Lord Foulkes, who coined the term cybernat, said: “I think Alex Bell is absolutely right. It was a negative thing. It really did harm them, the really aggressive ones.

“However to be fair I’ve noticed a very big change since Nicola Sturgeon took over.

“I don’t get anything like the same volume of attacks, as if she’s called them off, whereas Alex Salmond gave them a sort of licence to do what they liked.”

Labour MSP James Kelly added: “The SNP as a government have been more concerned with poll ratings than radically changing the country for the better. Nowhere is this clearer than in education - ignored for a decade of government before suddenly becoming a priority after Labour forced it to the top of the agenda.”

An SNP spokesman said: "The SNP is focused on making the positive case highlighting the opportunities of independence - and the evidence shows that more and more people in Scotland are opening up to these opportunities in the aftermath of the UK's vote for Brexit, risking pulling Scotland out of the EU against our will."