An independent Scotland would have to apply for European Union (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, Edgars 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.
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.