The RMT has become the first major trade union to declare itself in favour of Scottish independence, in what has been described as “a humiliation for Ed Miliband”.

A ballot of the transport union’s Scottish members saw them narrowly record a majority in favour of the Yes campaign by a margin of 1,051 to 968. A further 365 voters were undecided.

Nicola Sturgeon, Scotland’s Deputy First Minister, said the announcement was a “humiliation” for the Labour leader, who was campaigning in Scotland today. “It completely demolishes his claims to be the authentic voice of working-class, Labour-minded voters across Scotland,” she said.

A Scottish Labour spokesman pointed out that six other trade unions, representing 130,000 Scots, have said they are in favour of a No vote. “The vast majority of trade unionists in Scotland agree that we are stronger together,” he said.

Ms Sturgeon and Alex Salmond set out their decade-long vision for an independent Scotland yesterday as they celebrated 10 years of their partnership as leader and deputy leader of the SNP.

Amid jubilant crowds waving Yes placards in central Glasgow, the pair highlighted four policies which they said would benefit Scotland in its first 10 years as an independent country, should the vote go their way on 18 September.

They included scrapping the Trident nuclear deterrent to pay for free childcare; providing more apprentices for young people; protecting the NHS from privatisation; and setting a state pension age that is “right for Scotland”.

Hitting back at Mr Miliband’s claims that the SNP’s policies on social justice post-independence were a “con”, Mr Salmond said: “What [he] doesn’t seem to understand is that this is not about the SNP. This about the opportunity the people of Scotland have at each and every future election to get the government of our choice.”