A delighted Alex Salmond was celebrating last night after persuading his party to drop its opposition to Nato – a decision which has already been dubbed the SNP's "Clause 4 moment".
In an echo of Tony Blair's fight in the early 1990s to get the Labour Party to ditch Clause 4 of its constitution – which tied the party to the principle of wide-scale renationalisation – Mr Salmond faced a major internal battle to get the SNP to embrace Nato.
The SNP has opposed Scottish membership of Nato for the past three decades, a policy which has helped give it a reputation for being left wing and anti-nuclear. Mr Salmond was aware of the polarising image his party had become saddled with as a result of this policy, which is why he wanted it changed to a more moderate, centrist, Nato-friendly attitude well ahead of the referendum in 2014.
Yesterday, he got his wish as the annual SNP conference in Perth voted by 426 to 332 to adopt a policy committing an independent Scotland to continuing membership of Nato – but without any nuclear weapons in Scotland.
Mr Salmond did not speak in the debate but he made his feelings on the issue clear to delegates by putting his name to a series of pieces for Scottish newspapers, supporting the new, more moderate, policy approach.
Yesterday's Nato debate was always destined to be the most controversial of the conference and the 1,200-seat Royal Concert Hall was packed with supporters of both sides cheering and applauding their speakers.
The divisions within the party were also evident outside the hall. Colin Fox, a former MSP for the Scottish Socialist Party, was one of 100 anti-Nato demonstrators chanting "No to Nato" and handing out leaflets to the delegates.
Mr Fox agreed there were similarities between the SNP's decision to ditch its opposition to Nato and New Labour's scrapping of Clause 4. But he said: "We believe that embracing Nato will make the Scottish people less likely to support independence."
Inside the hall, the pro-Nato motion was proposed by SNP MP Angus Robertson, the party's defence spokesman. Mr Robertson said Scotland had to be a good neighbour and ally to the other countries in northern Europe that helped defend the continent.