Our Politics newsletter is now daily. Join thousands of others and get the latest Scottish politics news sent straight to your inbox. Subscribe Thank you for subscribing We have more newsletters Show me See our privacy notice Invalid Email

ALEX Salmond was convinced he was on course for a historic referendum win right until the votes were counted, the Daily Record can reveal.

Private polling by a firm of election experts had the First Minister believing he would pull off a shock victory.

The nationalists had employed Canadian voter contact specialists First Contact to conduct secret opinion polling.

And an analysis of their findings by two leading academics in New York said the Yes campaign would win by 54 per cent to 46.

The SNP were widely thought to have the most sophisticated data-modelling system in the UK before the vote.

But it failed to call the referendum right. Salmond was devastated and announced his intention to step down as First Minister within hours .

The false impression caused by their internal polling meant the SNP leadership were confident of winning until the first local authority areas began declaring results early on Friday.

The Yes camp contacted a number of journalists at around 10pm on Thursday and gave details of a planned victory speech by Salmond.

And First Contact were so confident of the result they revealed their 54 per cent Yes prediction to the Canadian press before the votes were counted.

“I believe they’re going to win,” the firm’s Mike O’Neill told the Toronto Star. “I feel pretty confident.”

A senior SNP source last night admitted that expectations of victory were high until the

very end.

“The turnout was so high that it was very unpredictable but we really did believe we had done enough for victory,” the insider said. “The numbers we were getting back from the pollsters were excellent.

“It quickly became clear as the votes were counted that something had gone wrong, but at the start of the night we definitely thought we had done it.”

poll loading Who do you think should replace Alex Salmond as SNP leader? 1000+ VOTES SO FAR Nicola Sturgeon Derek Mackay Mike Russell Kenny MacAskill Other

Meanwhile, Better Together’s campaign director yesterday claimed Scotland might have voted for independence if unionists had not kept their relentless focus on the economic risks of a Yes vote.

Critics of the anti-independence campaign repeatedly called on them to be more positive. But Blair McDougall defended the tactics by pointing to polling that suggested only 40 per cent of voters would base their decision on an emotional case for the UK.

He told a meeting at the Labour conference: “It would have made people feel nice, but it would have made the 40 per cent who already agree with us feel nice. There was a constant drumbeat to talk about identity, about a sense of belonging, but that was always going to be a core voter strategy.”