Foreword by the First Minister
On 23 June, the people of Scotland voted categorically and decisively to remain within the European Union ( EU).
Although the concerns of those who voted to leave must be listened to and addressed, there is clearly a strong desire in Scotland to be a full and active member of the European family of nations. The Scottish Government shares that desire.
There was also a majority for Remain in Northern Ireland. In England and Wales, there were majorities to Leave.
The stark divergence in the democratic will between the different nations of the United Kingdom ( UK) demands a reappraisal of how political power in the UK is exercised.
Before she became Prime Minister, Theresa May, set out her view of a UK "in which Scotland, Wales, Northern Ireland and England continue to flourish side by side as equal partners." 
Accordingly, the way in which the Westminster Government responds to proposals put forward by the devolved administrations will tell us much about whether or not the UK is indeed a partnership of equals.
Following the Brexit vote both the Scottish and UK Governments made a number of commitments.
The Prime Minister said that Article 50 would not be triggered until there was a UK approach, that Scotland would be "fully engaged" in the process and that she was willing to listen to "options". 
For the Scottish Government, I said I would seek to bring people in Scotland together in common cause and to build as much consensus as possible.
I said I would explore - not just my preferred option of independence - but all options to protect Scotland's place in, and relationship with, Europe.
And I said the Scottish Government would - in good faith and a spirit of compromise - seek to identify a solution that might enable Scotland's voice to be heard, and mitigate the risks that Brexit poses to our interests within the UK.
The proposals in this paper meet those commitments.
In all of this our single, overriding concern is to protect Scotland's national interests.
It is our determination to ensure Scotland's voice is heard, and acted upon. That is the hallmark of the Scottish Government's approach.
At the heart of the proposals in this document, and our proposals for any EU negotiations, we are determined to maintain Scotland's current position in the European Single Market.
The Scottish people did not vote for Brexit, and a "hard Brexit" would severely damage Scotland's economic, social and cultural interests. It will hit jobs and living standards - deeply and permanently. That is why we are so determined to avoid it.
There are various ways in which Scotland's place in the European Single Market could be maintained.
One option - in my view, the best option - is to become a full member of the EU as an independent country. Indeed, independence would resolve the fundamental cause of the position Scotland currently finds itself in: Westminster Governments that Scotland doesn't vote for, imposing policies that a majority in Scotland does not support.
The Scottish Government was elected in May on a manifesto which said in relation to independence:
"The Scottish Parliament should have the right to hold another referendum [...] if there is a significant and material change in the circumstances that prevailed in 2014, such as Scotland being taken out the EU against our will."
There is no question, therefore, about the legitimacy of the Scottish Parliament and the people of Scotland considering the question of independence in these circumstances.
As leader of a party that supports independence it is my belief that an independent Scotland is the best way to secure a more prosperous and equal country.
However, the focus of this paper - in line with the clear commitment I gave in the aftermath of the EU Referendum - is to explore if we can find common ground with the UK Government around a solution that would protect Scotland's place in the European Single Market from within the UK.
It stands to reason that the proposals we put forward in this paper fall short of what we consider to be the best status for Scotland and the UK - full membership of the EU.
However, they are designed to mitigate - as far as possible - the real and serious risks for Scotland caused by being taken out of the EU against our will.
Firstly, we argue that the UK as a whole should remain within the European Single Market - through the European Economic Area - and within the EU Customs Union.
Secondly, we consider how Scotland could remain a member of the European Single Market and retain some key benefits of EU membership even if the rest of the UK decides to leave.
We recognise and explore the significant practical challenges involved in implementing such proposals. We do not underestimate the scale of those challenges. But political leadership is about finding solutions and this paper attempts, in good faith, to set how the undoubted challenges might be overcome if the political will exists to do so.
It should be noted that there is already a range of asymmetric and differentiated arrangements within the EU and single market framework.
In addition, the UK Government already appears open to a "flexible Brexit" approach in relation to different sectors of the economy. It will also be necessary to take a flexible approach in relation to Northern Ireland and Gibraltar. The Mayor of London has also indicated that he will seek special arrangements for London, particularly in relation to immigration.
The fact is that the negotiations ahead - given the unprecedented circumstances in which we now find ourselves - will be characterised by a necessity to find practical solutions to a range of complex issues. It is in this spirit that we seek to find solutions that will respect the voice and protect the interests of Scotland.
It is also important to stress that this proposal does not prioritise the European Single Market over free movement and free trade within the UK. We consider that UK-wide free movement and free trade could and would continue if Scotland becomes independent, just as the UK Government believes that free trade and movement between the UK and the Republic of Ireland will continue after Brexit. Our proposal seeks to secure the benefits of the European Single Market for Scotland in addition to - not instead of - free trade across the UK.
Finally, we argue that in light of the removal of the rights and protections provided by EU law - and whatever the outcome of the Brexit negotiations - Scotland's interests within the UK demand that the powers of the Scottish Parliament be fundamentally revisited. This paper looks at three broad categories of powers that should now be considered:
1. Those powers that will be "repatriated" to the UK from Brussels and that currently sit within the Scottish Parliament's competence, for example fishing and farming. These must remain the responsibility of the Scottish Parliament.
2. Those powers to be "repatriated" that are not currently within the Scottish Parliament's competence and where devolution would allow the Scottish Parliament to protect key rights, for example employment law.
3. Powers, beyond those to be "repatriated", to protect Scotland's interests, including those to support the differentiated solutions for Scotland proposed in this paper: for example, powers over immigration, powers to conclude international agreements in areas of Scottish Parliament responsibility, and a range of powers that would be required for the Scottish Government to meet the regulatory and administrative requirements of continued European Single Market membership.
As I have said, we fully acknowledge the option set out in this paper is challenging. But these challenges must be seen in a context where the Brexit vote and the UK Government's apparent drive for a "hard Brexit" mean that there are no simple options. We believe our practical solutions are reasonable and in the best interests of Scotland - in a context that will be complex and unprecedented whatever the ultimate outcome.
The Scottish Government stands ready to work closely and co-operatively on our proposals with the UK Government, other political parties, organisations and individuals across Scotland on the outcomes we seek and the principles we are adopting.
We recognise these proposals do not confer the full benefits of EU membership, or of independence. As a government we remain committed to EU membership as an independent nation - and are proud to say so. However, the proposals in this document are our contribution to ongoing efforts to build consensus. They represent a compromise on our part - but also what we consider to be requirements for Scotland if a UK solution to Brexit is to be found. We expect the UK Government to show similar flexibility.
As the UK is the EU Member State it will be for the UK Government, not the Scottish Government, to negotiate directly with the other 27 Member States. Therefore, we expect the UK Government to honour its clear previous commitment to involve Scotland in the development of the UK position prior to the triggering of Article 50, to consider the options now advanced and to guarantee that Scotland will be fully engaged in the discussions going forward.
However, the Scottish Government will not compromise on our determination to build a strong economy and ensure that Scotland remains an open, welcoming European society.
If the real and substantial risks that Brexit poses to Scotland's interests cannot be mitigated within the UK, the option of choosing a better future through independence should be open to the Scottish people.
Europe is about more than economics. The European ideal is one of peaceful co-existence, mutual solidarity and support, and prosperity built on co-operation. There is much still to achieve, but a Europe which encourages openness and civic dialogue, and which welcomes difference, is one from which Scotland has gained much and to which it still wants to contribute.
We embrace the values of solidarity, co-operation and democracy which underpin the European Union, and in everything we do we will strive to build a successful, dynamic economy and a fair society, now and for the generations to come.
Nicola Sturgeon MSP