The SNP pledged today to kick nukes out of an independent Scotland but stay in the world's nuclear club.
It went down to card-counts at the party's Perth conference as delegates decided by just 94 votes to scrap its long-standing opposition to joining Nato.
The debate hinged on Nato's policy of "nuclear sharing," where the US stations nukes in other Nato countries.
That is in stark opposition to the SNP's commitment to unilateral nuclear disarmament, including kicking Britain's Trident missiles out of the Clyde.
But Nato operations in Afghanistan and elsewhere have also underpinned the party line.
While Scotland remains part of Britain, such issues are out of the SNP's hands and the push for independence has brought the Nato debate to a head.
Defence minister Angus Robertson, who backed the change, said the public had to know what to expect in an independent Scotland under the SNP.
"This is about much much more than carrying a conference hall - this is about carrying a country."
Justice Secretary Kenny MacAskill told delegates he was "no US lapdog," citing his decision to release Abdelbaset al-Megrahi, whom the US claims was behind the Lockerbie bombing.
He said that no-one in the SNP wanted Trident or the "obscenity" of nuclear weapons - and the SNP would scrap Trident regardless.
"But I want it to be part of the constitution of an independent Scotland.
"To do that we've got to win in 2014."
Mr MacAskill said he had criticised Nato in the past "but Nato has changed."
"There is no more war. The Baltic states, the Czech republic - these people are now on our side."
Many people in Scotland could not say what it was they feared tomorrow, he said, "but whether their fears are rational or irrational we need to allay their fears."
SNP trade unionist Bill Ramsay couldn't believe his ears.
"You don't deal with irrationality by pandering to it, you educate.
"Joining Nato is as strategically cunning as joining the British Labour party to try to convince them to go for Scottish independence."
If you appreciated this article then please consider donating to the Morning Star's Fighting Fund to ensure we can keep developing your paper.
Defence Secretary Philip Hammond believes himself vindicated by the High Court ruling that his Iraq Historic Allegations Team (IHAT) is independent.
A look at the causes and possible outcomes of Silvio Berlusconi and his right-wing coalition's lead in the polls.
Attacks such as yesterday's horrific murder in Woolwich didn't happen before the 'war on terror.' It's time we recognised the consequences of the conflicts we've unleashed