Deputy First Minister Nicola Sturgeon has called for early talks about an independent Scotland's place in the EU in response to comments that the country may have to reapply.

Jose Barroso, president of the European Commission, prompted the move by saying it is "obvious" that a newly independent state would need to apply for membership.

Ms Sturgeon said "no serious person" can argue that it would be in anyone's interest for Scotland to be denied continuous membership. But PM David Cameron said Mr Barroso had made a "significant intervention", while opposition parties at Holyrood seized on the comments.

Mr Barroso was asked if Scotland would need to reapply to join the EU if it leaves the UK following a referendum due to be held in 2014.

"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," he said.

Despite that comment, there is no consensus between the two sides of the independence campaign on what would happen to Scotland. The Scottish Government says the country would be able to negotiate from within the UK, the member state, after a Yes vote but before formal independence.

Unionists say that Scotland would be left outside the EU until it was reaccepted, potentially forcing it to adopt the euro and join the Schengen free-travel area, putting it at odds with England. Mr Barroso said a hypothetical new state would need to renegotiate terms.

Ms Sturgeon challenged Mr Barroso's comments, arguing that the "real" threat to membership comes from eurosceptics at Westminster.

"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," she said. "No serious person can argue that it is anything other than in the interests of the EU to keep Scotland in continuous membership."

Opposition groups at Holyrood criticised the SNP position. Labour's Patricia Ferguson said: "For months Alex Salmond and Nicola Sturgeon have put their heads in the sand, ignored the warnings about Scotland's future in the EU and pretended that everything will be fine. That is no longer an option."