David Cameron is "playing a game of European roulette with Scotland's future", First Minister Alex Salmond has claimed.
Mr Salmond said the appointment of Jean-Claude Juncker as the next president of the European Commission had been an "utter fiasco" for the Prime Minister, who had opposed it, and has put the UK "on the fast-track out of Europe".
Writing in The Independent, Mr Salmond said the people of Scotland must "take our destiny in our own hands" when they vote in September's referendum.
Referring to Mr Cameron's failed bid to block Mr Juncker's posting last month, he wrote: " For all the talk of deal-making, it showed how isolated the UK has become in Europe - and it fatally undermines the Prime Minister's proposal to renegotiate the UK's relationship with Brussels ahead of his proposed in-out referendum.
"The handling of the whole affair now puts the UK on the fast-track out of Europe, with the danger for us in Scotland that we are dragged to the exit door too unless we take our destiny in our own hands this September.
"Cameron is playing a game of European roulette with Scotland's future, and with the jobs of many thousands of people in Scotland whose livelihoods depend on our links with the EU."
Mr Salmond described the referendum as a "defining moment for our nation" but added that Scotland's status as one of the top destinations in the whole of the UK for inward investment would be put in jeopardy if it left the European Union.
"Only a Yes vote on September 18 will restore Scotland's ancient status as an independent European nation, and help secure our future prosperity," he said.