Alex Salmond's rather fixed smile said it all - that was close. By a relatively narrow margin, the SNP conference voted to change long-standing party policy and to commit to an independent Scotland retaining membership of Nato.
Mr Salmond sat on the platform throughout, applauding those who backed Nato membership. But he deliberately chose not to intervene in the debate itself. He wanted the conference to take the decision without turning it into an explicit leadership loyalty test.
Mind you, he had a number of lieutenants on hand to make clear what the leadership wanted. His predecessor John Swinney urged support for a policy change.
Perhaps the most influential speech came from Kenny MacAskill, the Justice Secretary. He opened with a wry reminder that he was scarcely in the pocket of the United States (as the man who released the Lockerbie bomber from prison.)
But then it was passion, emotion. He had marched with CND, he said. He had lobbied and cajoled for nuclear disarmament. He was "tired of marching". He wanted independent power in order to bring about change. The chat after the debate was that he may have won the day with his powerful pitch.
To be clear, the SNP leadership case, advanced by Angus Robertson, was based partly on principle - the argument that Scotland lies adjacent to the North Atlantic and must co-operate with her neighbours, many of whom are in Nato.
MEP Alyn Smith - who seldom misses a chance to tell it as he sees it - said that other European countries viewed the non-Nato stance as "naïve".
But I was struck by the extent to which many of the leadership arguments were founded upon pragmatism. In essence, the case being made was that withdrawal from Nato was an obstacle in cajoling a section of the electorate to vote for independence.
Opponents of Nato membership argued that it would be "hypocritical" for the SNP to seek to banish Trident from Scotland while simultaneously adhering to a defence organisation which retains a nuclear strike capacity.
They argued further that Nato might seek to thwart the SNP plan to remove Trident post independence.
Mr Salmond had said in advance that the constitution of an independent Scotland would preclude nuclear weapons. The policy now, as updated by the party, is to remain in Nato - but only on condition that Trident is removed.
It was an excellent, lively debate - with heat on both sides. Understandably, the opponents of Nato are feeling sore. Will they retain a grudge? In the longer term, I doubt it. For one thing, the debate was extended. Proponents and opponents were given a full hearing - albeit some argued for a more prolonged, considered scrutiny.
For another, the desire for independence trumps everything in the SNP. They yearn, collectively and individually, for independence - and, consequently, are prepared to subjugate other issues.