An independent Scotland would have to apply for EU membership as a new state, according to Latvia's foreign minister.
"All the chapters of negotiations" would have to be opened, although the process could be "much quicker" than that for other new members given Scotland already complies with EU regulations, Edgar Rinkevics said.
Areas such as joining the euro and the Schengen free area of travel would be discussed and negotiated.
"We consider that if Scotland declares independence, it is a new country which I believe would naturally become a member of the UN, member of the different other regional organisations and most probably a member of the European Union," Mr Rinkevics said in an interview with BBC Scotland.
"But in that case we would see it as a process of admitting new members into the European Union."
Latvia is due to take over the presidency of the EU in 2015, and Mr Rinkevics said his country will "probably have to deal with this issue" if Scotland votes yes in the 2014 referendum.
Legal opinion is needed on whether the rest of the UK would automatically inherit the UK's current EU membership, the minister went on to say.
"I understand that the commission and also colleagues from EU legal services are considering that. I think we need solid legal opinion on this," he said.
Mr Rinkevics is the latest European politician to give his view on Scotland's place in the EU if it becomes independent.
Ireland's minister for European affairs, Lucinda Creighton, said: "I think it is clear that a newly independent state would have to (and would have the right to and indeed should) negotiate the terms of membership, as they would undoubtedly be somewhat different to the existing terms."
According to Czech foreign minister Karel Schwarzenberg, Scotland would have to apply for EU membership, while Slovakia's deputy prime minister, Miroslav Lajcak, said it is unclear if an independent Scotland would remain in the EU.
A Scottish Government spokesman said: "The Latvian foreign minister said that the European Commission legal service is currently looking at both Scotland and the rest of the UK's position in the EU following a Yes vote in 2014.
"We consider that it is possible to prepare and publish a precise scenario that will provide the European Commission with the information it needs to consider an independent Scotland's continued EU membership, and we continue to call on the UK Government, as existing member state, to join with us in making such a submission."
Scottish ministers have always been clear that there will be negotiations on specific terms of Scotland's EU membership but that these will take place from within the EU, the spokesman said.
"In the transition period immediately after a Yes vote in 2014, Scotland will still be part of the UK so, by definition, will still be part of the EU while these negotiations take place.
"Scotland is already part of the territory of the European Union and the people of Scotland are citizens of the EU and as legal, constitutional and European experts have confirmed, there is no mechanism for this status being removed.
"There is, of course, much discussion of law and process in this debate. But ultimately, the most powerful case for Scotland's continued membership is not based on law or process but on common sense, reality and mutual self-interest."