The Prime Minister has been accused of politicising Armed Forces Day after he said the UK's military strength kept Scots safe.
It happened as David Cameron visited Stirling to mark the event.
He paid tribute to military personnel and their families, but quoted the Better Together slogan - the Best of Both Worlds - when he called for Scotland to remain in the United Kingdom.
Angus Robertson, the SNP's defence spokesman, said the PM's attempt to politicise the event was an error of judgment.
Thousands of spectators joined Alex Salmond, Mr Cameron, Labour leader Ed Miliband and the Princess Royal for the Stirling event.
A re-enactment of the Battle of Bannockburn is continuing today on the site of the battle.