Nicola Sturgeon has warned there will be strong backlash from voters if Scotland is taken out of Europe against its will.
In a speech in Brussels, the First Minister said leaving should only be possible if all four UK nations agree.
David Cameron says he'll hold a referendum before the end of 2017.
If most Scots vote to stay, and the rest of the UK decides to leave, Nicola Sturgeon says it could spark another drive for independence.
Spain's Prime Minister has suggested Scotland would have to apply to join the European Union after a 'Yes' vote in next year's independence referendum.
Mariano Rajoy's intervention prompted heated exchanges at First Minister's questions today as Alex Salmond clashed with Labour leader Johann Lamont.
Watch the full report from our Political Editor Peter MacMahon below.
The Scottish First Minister Alex Salmond has clashed with Labour leader Johann Lamont today over an independent Scotland's membership of the European Union.
Spain's Prime Minster Mariano Rajoy has suggested that Scotland would have to apply to join the EU after a referendum Yes vote.
His intervention led to heated exchanges at First Minister's Questions at Holyrood this afternoon.
A suggestion that an independent Scotland would have to apply for membership of the European Union as a new state has been dismissed by a member of Alex Salmond's cabinet.
Rural Affairs Secretary Richard Lochhead said if there was a Yes vote in next year's referendum, Scotland would negotiate to become an independent member of the EU from within Europe.
Speaking to BBC Radio Scotland, he said the country would enjoy a:
He spoke out after Spanish prime minster Mariano Rajoy said that if part of an existing member state became independent, it would be "left out of the European Union" and would need to apply for membership as a new state.
Mr Rajoy reportedly told a press conference in Madrid yesterday:
After comments made by Mariano Rajoy, Prime Minister of Spain concerning an independent Scotland's membership of the EU, Better Together leader Alistair Darling said:
The Prime Minister of Spain has said that Scotland will remain outside the European Union if it becomes independent of the UK.
EU rules state that new countries require a unanimous vote by existing member states if they are to join the union.
But speaking today at a joint press conference with France's Francois Hollande, Spanish PM Mariano Rajoy suggested he would use his country's veto if Scotland applied.
"It is very clear to me, as it is for the rest of the world that a region that obtains independence which is part of a nation state of the EU will stay outside the EU," he said.
"The citizens know it, the Scottish know it - as do all the rest of the citizens of the EU."
Spain's position may be influenced by the likelihood of a would-be independent Catalonia also wanting to remain within the union.
Farmer Will Rawling says that the decision from the EU to award Lakeland Herdwick protected status has come at a crucial time for fell farmers:
The famous Lakeland Herdwick meat has been granted protected status by the European Union, putting it in the same league as champagne and Parma ham.
The new status means that meat can only be described as Lakeland Herdwick if it comes from the Herdwick breed and was born, raised and slaughtered in the county of Cumbria.
The special breed are native to the central and western Lake District, and live on the highest of England's mountains.
They are renowned for their hardiness and are managed in the traditional way.