Speaking at a meeting in York, the Prime Minister said: "Look at the problems of terrorism - very much in my mind with all the news of the appalling events in Nairobi, the apparent abduction of the Libyan Prime Minister this morning.
"When you think about how to keep us safe as a country, it's better that we have police forces that work together, intelligence and security services that cover the whole of our United Kingdom. So I hope we send a very clear message to the Scots that we want you to stay."
Last night, Alex Salmond responded angrily, with his spokesman saying: "This is distasteful and absolutely disgraceful for the Prime Minister to use an incident in which six Britons and 72 people died to campaign against Scottish independence. This is a new low for Project Fear."
This week, the UK Government's analysis paper on defence and independence raised doubts that a breakaway Scotland would be accepted into the so-called Five Eyes intelligence-sharing community, comprising the UK, US, Canada, Australia and New Zealand, and that it would cease to benefit from the bilateral UK-US relationship.
The paper concluded: "In effect, this would almost certainly mean Scotland losing access to billions of pounds of world-class military capability and access to vital intelligence material, which is essential for maintaining national defence and security."
In its recent report on Scottishindependence, the Commons Defence Committee also suggested an independent Scotland would find itself at a greater security risk than at present.
It said: "A high degree of co-operation with the UK would be crucial for Scotland, especially in the early years of independence. However, such co- operation would rely on goodwill and Scotland could find itself more vulnerable to threats than it is at present."