BRUSSELS (Reuters) - If Scots vote for independence, it will be in part because they believe assurances that their small Atlantic peninsula can quit the United Kingdom without ever leaving the secure embrace of the European Union.
That, however, is not how the EU's top executive sees it. European Commission President Jose Manuel Barroso expressed the view early this year that Scotland would be automatically excluded on becoming independent and would find readmission to the 28-member bloc "extremely difficult, if not impossible".
Between these two poles lie uncharted legal waters, and campaigners on both sides are already engaged in the kind of debate once confined to classes in constitutional theory. That debate could rage in pubs, cafes and parliaments across Europe if, against the odds, Thursday's referendum breaks up Britain.
Partial legal precedents cited for and against the Scottish case include Algeria, which kept some access to European markets for a time after it broke from France, Danish-ruled Greenland's exit from the EU and Kosovo's disputed statehood, as well as the EU's absorption of 16 million East Germans with minimal fuss.
Ultimately, however, it may be less lawyerly argument and more messy but flexible EU politics that win the day.
A compromise could prevent five million EU citizens being cast out against their will while easing fears in Spain and beyond that it opens a Pandora's Box of centrifugal spirits - Catalan, Basque, Flemish, Breton, Lombard and many besides.
"Whatever the lawyers say, this will come down to politics," said an official in Brussels who, like diplomats and bureaucrats across the bloc, would not be drawn into the campaign by talking publicly on what most of them hope remains a hypothetical issue.
"It's the EU way," the official said. "Whatever politicians eventually negotiate can be made to fit the texts."
Whether it can be done in 18 months to coincide with a formal independence declaration, as Scots nationalists assert, is another matter. They face a huge task of unraveling the UK in that time, while Britons elect a new London parliament in May that could then, if Prime Minister David Cameron is re-elected, call a referendum on the UK itself quitting the EU.
"It would all take longer than you think," John Kerr, a pro-union Scot who was Britain's EU envoy and headed its diplomatic service, wrote in a paper for the Centre for European Reform.
"Anyone who says it's certain that the Scots could, or could not, have their own seat at the Council table from 2016 is driven more by advocacy than analysis," Kerr wrote in July.
"The EU would be in uncharted waters," he said, recommending a focus on ad hoc transitional arrangements to avoid disruption to lives and livelihoods during possibly lengthy negotiations.
England, too, had an interest, he said, in not having to man a new EU border on Hadrian's Wall, 2,000 years after the Roman empire drew its own frontier midway up the island of Britannia.
Barroso's view, echoed by his incoming successor Jean-Claude Juncker, is broadly that, as a new state, Scotland would be outside the EU and have to apply to join. Acceptance needs unanimity and Spain, Belgium, Italy or others fearful of setting secessionist precedent might veto it.
Nationalist leader Alex Salmond, anxious to reassure voters they would not lose access to jobs, trade and travel across Europe if they quit the UK, says expelling Scotland would be "absurd" after 41 years in the bloc, an affront to founding EU principles of democracy after an exemplary vote agreed with London.
One fundamental legal difference between Barroso and Salmond is in their view of which part of the EU Treaty would apply to making adjustments for an independent Scotland. The European Commission insists it would be Article 49, setting out accession for new members. The Scottish government says Article 48, under which existing members can modify their relations, should apply.
Barroso and Juncker, who will run the EU's executive from November, have refused to elaborate on the Scottish question. Juncker has said he sees no enlargement of the EU in his five-year term but is vague on whether adding a seat for Scotland counts.
In private, officials in Brussels are hardly more talkative, anxious not to be accused of trying to influence a referendum that most European governments wish was not taking place.
Some feel, however, Barroso went too far in telling a BBC interviewer in February that Scottish membership of the EU might be "impossible". That, officials concede, went beyond the Commission's view and may reflect the former Portuguese premier trying to help his Iberian neighbors stifle Catalan separatism.
One official said he scarcely imagined Juncker agreeing that Scotland be treated other than as a new applicant country under Article 49 - but arguments for accelerated re-entry, based on Scots having already been EU citizens, carried some weight.
Unlike when Britain joined in 1973, new members now have to commit to adopting the euro at some stage and to joining the Schengen passport-free travel zone.
These are both things Salmond says Scotland would not do "in the foreseeable future" as he tries to reassure referendum voters that he can negotiate with London to keep the pound and a common travel area with the UK and Ireland.
Commitments to the euro and Schengen without hard timetables might allow compromise. Apart from anything else, Scotland would not qualify to use the euro in the present state of its economy.
The issues of currency and borders highlight the degree to which Salmond's plan for independence relies in the first instance on negotiations with London that Cameron's government refuses to start until after a Yes vote that it thinks unlikely.
That has been a frustration for the Edinburgh government, which says it has been unable yet to hold discussions with the EU because London, as the EU member, has not initiated them.
Given the increasing bitterness of the referendum campaign, it would be startling to see London leaders heading to Brussels arm in arm with Salmond to help him join the European Union. But Scots officials and many analysts see that as a logical step.
"The UK government will not want Scotland not to be part of the EU," said Nicola McEwen, professor of politics at Edinburgh University. She said negotiations would be complex, not least because Cameron, aiming to quell anti-EU revolt in his party, is pushing for decentralizing reform of the EU and promised Britons a 2017 referendum on leaving it, if he is re-elected next May.
Cameron's political survival may be in jeopardy if the Scots referendum backfires in a Yes. But any successor may want to smooth Scotland's place in the EU - to limit disruption to the UK economy and, possibly, to avoid encouraging English voters, free of the Europhile Scots, from demanding exit from the bloc.
Cooperation on untangling the 307-year-old union would also be vital for Edinburgh, since little would discourage Brussels from embracing Scottish accession more than finding itself drawn into a domestic feud within the still United Kingdom.
And finally, London's cooperation would be vital to avoiding the threat of a Spanish veto, since what marks out the Scottish case from Catalonia and others is that London agreed to divide the British state - something Madrid says Spain can never do.
Montserrat Guibernau, professor of politics at Queen Mary, University of London, said Madrid, which refuses to recognize Kosovo's violent break with Serbia, would be reluctant to antagonize London if the UK government negotiated for Scotland to be in the EU. But Spain's final position was uncertain.
"They would emphasize that Catalonia and Scotland are different constitutionally," she said, referring to Madrid's flat rejection of Catalan demands for a referendum in November.
Among activities that Salmond warns would be disrupted if Scots were ejected from the EU, European trawler fleets could be barred from Scotland's vast fishing grounds - a particular interest to Spain. But the SNP first minister has also been at pains to stress how independence for Scotland, freely contracted with London, sets no precedent for unilateral secession.
Discouraging his fellow European separatists would be key to winning over other EU governments in negotiations, said McEwen: "The first person that will come out and say that this sets no precedent for Catalans or anyone else will be Alex Salmond."
For all the pre-referendum reticence abroad, there have been European voices speaking up in Salmond's favor.
Pat Cox, the Irish former speaker of the European Parliament, called for "internal enlargement" of the EU to 29 states by 2016 without a full accession process: "It is unclear what would be the common European interest in seeking to expel an independent Scotland," he said, warning on the contrary of "chaotic implications" for EU fisheries and other industries.
Jo Leinen, a German Social Democrat on the EU legislature's constitutional affairs committee, was quoted saying: "The Scots have been EU citizens since 1973 and are committed Europeans. A special accession treaty could be negotiated and ratified before the envisaged date of independence in March 2016."
Many who reject the idea Scots risk expulsion cite David Edward, a Scottish former judge at the European Court of Justice (ECJ). He has written on the implications of Article 50 of the EU treaty, which spells out a negotiating period of two years or more to unwind relationships before a state can leave the Union.
If the treaty rules out an abrupt departure "at the midnight hour" for those who want out, then, Edward argues, it cannot be in the spirit of the law to demand it of those who want to stay.
"The EU institutions and all the member states ... would be obliged to enter into negotiations before separation took effect," Edward wrote in a commentary cited by nationalists who want to begin talks with Brussels immediately after a Yes vote.
Other legal experts say Barroso ignored views that EU law is not just a matter of state treaties, in the manner of classic international law, but gives citizens individual rights, to live and work across the bloc for example, that could not be removed.
Sionaidh Douglas-Scott, professor of European and human rights law at Oxford, wrote recently: "How could ... the EU ... dispossess Scots of their acquired rights and EU citizenship as a result of Scotland using the democratic right to vote for independence? This would seriously undermine the EU's credibility and its claim to be a promoter of democracy."
At Edinburgh, politics professor McEwen forecast Europe's politicians could bridge the legal void, if needed: "The European Union is very good at finding ways around things."
Editing by Philippa Fletcher