The Scottish government is holding an independence referendum in autumn 2014.

Ministers have said that, in the event of a "yes" vote, Scotland would "quite clearly" remain part of the European Union and negotiations would take place "from within that context".

Responding to Mr Barroso's intervention - described by Prime Minister David Cameron as "significant" - Scottish Deputy First minister Nicola Sturgeon said the SNP government did not agree that an independent Scotland would have to reapply for European Union membership.

She said early talks were now being sought with the European Commission to discuss the specific process of Scotland becoming independent.

A letter from Mr Barosso to the House of Lords economic committee, which is examining the independence question, also confirmed his position that a new independent state would "become a third country with respect to the EU".

Mr Barroso, when asked by the BBC whether Scotland's membership would be "nodded through", responded: "I did not comment on specific situations of member states because I very much respect that it is their right, their sovereign right to decide about their organisation.

"What I said, and it is our doctrine and it is clear since 2004 in legal terms, if one part of a country - I am not referring now to any specific one - wants to become an independent state, of course as an independent state it has to apply to the European membership according to the rules - that is obvious."

Asked whether an independent country would have to renegotiate its terms, Mr Barroso said: "Yes.".

When further asked whether that negotiation would be from "inside" the EU, the president responded: "We are a union of states, so if there is a new state, of course, that state has to apply for membership and negotiate the conditions with other member states.

"For European Union purposes, from a legal point of view, it is certainly a new state. If a country becomes independent it is a new state and has to negotiate with the EU."

Mr Barroso also said that, if Scotland became independent, the rest of the UK would not have to negotiate a new position, because of the "principle of the continuity of the state".

Please turn on JavaScript. Media requires JavaScript to play.

The Scottish Deputy First minister, Nicola Sturgeon: "We've always said there would be negotiations"

In response, Ms Sturgeon said: "We do not agree that an independent Scotland will be in the position of having to reapply for European Union membership, because there is no provision for removing EU treaties from any part of EU territory, or for removing European citizenship from the people of a country which has been in the EU for 40 years.

"We have always said that the specific terms of Scotland's continued EU membership as an independent nation will be negotiated - but the crucial point is that these negotiations will take place from within the EU, because in the period immediately following a 'Yes' vote in the referendum, Scotland will still be part of the UK and the EU.

"No serious person can argue that it is anything other than in the interests of the EU to keep Scotland in continuous membership, given this country's huge natural resources in energy and other aspects which make us such a valuable European partner.

“Start Quote

A new independent state would, by the fact of its independence, become a third country with respect to the EU and the Treaties would no longer apply on its territory”

End QuoteLetter to Lords from Jose Manuel Barroso

If Scots voters vote 'Yes' in the referendum, Scottish ministers will seek to negotiate the terms of independence with Westminster between 2014 and 2016, negotiating their terms of EU membership at the same time.

The SNP says the Edinburgh Agreement between the Scottish and UK governments, which set out the framework for the referendum, commits both sides to work in the best interests of Scotland and the UK, including remaining inside the EU.

Following Mr Barroso's comments, the prime minister told a lunch meeting of journalists he was "not a legal expert' but "it seems as if you leave the UK you have to re-apply".

Mr Cameron went on to say Scottish First Minister Alex Salmond, "wanted to have his cake and eat it", by claiming you could remain in the UK following any vote to leave, and from that position negotiate membership of the EU.

It states: "The EU is founded on the Treaties which apply only to the Member States who have agreed and ratified them. If part of the territory of a Member State would cease to be part of that state because it were to become a new independent state, the Treaties would no longer apply to that territory.

"In other words, a new independent state would, by the fact of its independence, become a third country with respect to the EU and the Treaties would no longer apply on its territory."

Scotland's opposition parties have argued that Mr Salmond's position on EU membership under Scottish independence was based on "meaningless assertion".

Labour, the Tories and the Liberal Democrats said the consequences of an independent Scotland having to reapply to join the EU could mean having to adopt the Euro and set up border controls with England.

Transcript of the BBC Hardtalk interview

Interviewer: The Commission has made it clear that any country, a country like Scotland, that would choose to be independent, would need to reapply for EU membership. When you think about how that would work, would it just be nodded through, do you think?

Jose Manuel Barroso: "Look, I did not comment on specific situations of member states because I very much respect that it is their right, their sovereign right to decide about their organisation.

"Now, what I said, and it is our doctrine and it is clear since 2004 in legal terms, if one part of a country - I am not referring now to any specific one - wants to become an independent state, of course as an independent state it has to apply to the European membership according to the rules - that is obvious."

Interviewer: "So, it has to renegotiate its terms?"

Jose Manuel Barroso: "Yes."

Interviewer: "And is it renegotiating those terms from inside, as a member of the EU, or is it effectively reapplying from outside the EU?"

Jose Manuel Barroso: "We are a union of states, so if there is a new state, of course, that state has to apply for membership and negotiate the conditions with other member states......

Interviewer: "So if, and I am using the example of Scotland, and I appreciate you are not talking about specifics, but say a country like Scotland, it, say, chooses independence, it is then like a new state applying to the EU?"

Jose Manuel Barroso: "For European Union purposes, from a legal point of view, it is certainly a new state. If a country becomes independent it is a new state and has to negotiate with the EU.

Interviewer: "What about the rest of the UK that is effectively left behind by Scotland's independence...."

Jose Manuel Barroso: "That is the principle of the continuity of the state, in that case if a....

This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.