Media playback is unsupported on your device Media caption Ms Sturgeon was speaking at her official Bute House residence in Edinburgh

Nicola Sturgeon has argued it would be "democratically justifiable" for the whole of the UK to remain in the European single market after Brexit.

But the Scottish first minister also said it would be possible for Scotland to remain in the free trade bloc even if the rest of the UK left.

She was speaking as she unveiled proposals for Scotland's future relations with Europe after Brexit.

The prime minister has pledged to look "very seriously" at the proposals.

But the UK government has also warned that a special deal for Scotland is unrealistic.

In June's EU referendum, 62% of voters in Scotland backed remain, with 38% for leave.

Ms Sturgeon set up a "standing council" of experts on Europe in the immediate aftermath of the vote, saying she wanted to examine all options open to her government - including the possibility of a second independence referendum.

The Scottish government proposals have now been published in full in a paper called Scotland's Place in Europe.

Unveiling the document at her official Bute House residence in Edinburgh, Ms Sturgeon said Brexit was a problem that was not of Scotland's making and called for a "flexible" approach that took into account the needs of different parts of the UK.

She said the referendum result had been a vote on leaving the EU rather than a vote to leave the single market, and argued it would therefore be democratically justifiable for the whole of the UK to remain in the single market.

Media playback is unsupported on your device Media caption Scottish Secretary David Mundell says a "Team UK" approach will benefit Scotland

The Scottish government has proposed the UK as a whole should stay in the single market by remaining "a party to the European Economic Area Agreement" and staying in the customs union.

Ms Sturgeon said: "I accept that there is a mandate in England and Wales to take the UK out of the EU. However, I do not accept that there is a mandate to take any part of the UK out of the single market.

"It would make no economic sense whatsoever for the UK to leave the single market. It would be entirely democratically justifiable for the UK to remain within it."

'Hard border'

The first minister said she accepted that it currently seemed likely that the UK as a whole would leave the single market "given the rhetoric of the Conservatives".

So she said the "second strand" of the paper proposes ways in which Scotland could stay in the single market - through the European Free Trade Association (EFTA) and the European Economic Area (EEA) - even if the rest of the UK chooses to leave.

Ms Sturgeon insisted this option did not prioritise membership of the EU single market over continued free trade across the UK, but would "safeguard both".

She added: "Talk of a hard border for Scotland has always rung hollow from a UK government that says no such hard border will be required between a post-Brexit UK and the Republic of Ireland, a continuing member of the EU."

Image copyright Getty Images Image caption Ms Sturgeon has called for a substantial transfer of new powers to the Scottish Parliament after the UK leaves the EU

Ms Sturgeon also called for a fundamental review of the UK's devolution settlement, and said the UK government's response to her proposals would "tell us much, perhaps everything" about political power across the UK.

She said powers over immigration were increasingly vital for the protection of Scotland's interests, and should be devolved to Holyrood as part of a substantial transfer of new powers after the country leaves the EU.

Independence referendum

This transfer would include area returned from the EU which currently sit within Scottish Parliament responsibility - such as fishing, the environment, justice and agriculture.

It would also include areas which would allow Holyrood to protect key rights - for example employment law and social protection.

Ms Sturgeon also stressed that her preferred option of a second independence referendum should remain on the table if it is felt to be the best option for mitigating the Brexit "risk", which she said could cost Scotland 80,000 jobs if it has to leave the single market.

Speaking later in the Scottish Parliament as she formally informed MSPs of the proposals, Ms Sturgeon called on opposition parties to either back her or bring forward their own plans.

Brexit minister Mike Russell was originally meant to give the Holyrood statement, but Ms Sturgeon stepped in after Presiding Officer Ken Macintosh voiced "concern" that a major policy announcement had been given to the media before MSPs.

ANALYSIS

By Brain Taylor, BBC Scotland political editor

Image copyright Getty Images

The proposals from the Scottish Government on the topic of Brexit are intriguing on the issues of policy and strategy. Perhaps, however, it is the strategic element which will prove the most significant in the longer term.

To recap very briefly, Nicola Sturgeon makes three broad points.

One, Brexit is a Bad Thing (the capital letters are for those who enjoyed 1066 And All That.) Two, the UK should seek to mitigate the likely impact by retaining access to the European single market. Three, if the UKG won't pursue such a route, then they should enable Scotland to maintain access via the European Economic Area.

There is, of course, a fourth element implicit in the syllogism. That of indyref2, the prospect of a further referendum on Scottish independence.

Actually, Nicola Sturgeon made that prospect explicit by noting drily that there could be few involved in politics who had not yet grasped that the SNP favoured an independent Scotland.

So why, asked one member of the wicked media, did she not jump straight to indyref2? Because, she said, she was conscious of her responsibilities as First Minister, not just SNP leader. And she had promised to examine options within the UK.

Read more from Brian

Responding to the paper, a Downing Street spokesman said the government welcomed it and would "look closely" at it.

It is expected to be discussed in detail when the UK government and devolved administrations meet at the Joint Ministerial Committee in January.

But the spokesman made clear that Prime Minister Theresa May is determined to deliver a UK-wide Brexit and did not believe there should be a second referendum on Scottish independence.

He added: "The government is committed to getting a deal on exiting the EU that works for all parts of the UK - which clearly includes Scotland - and works for the UK as a whole.

"The best way for that to be achieved is for the government and devolved administrations to work together."

The first minister said her proposals for protecting Scotland's place in Europe were a "serious and genuine attempt" to "unify the country around a clear plan" and represented a "significant compromise" on the part of the Scottish government, given its commitment to seeking independence.

The first minister added: "I hope and expect that the UK government in considering these proposals will demonstrate the same flexibility and willingness to compromise."

'Window dressing'

Earlier this month the Chancellor, Philip Hammond, appeared to rule out a special Brexit deal for Scotland during a visit to Edinburgh, saying it was "not realistic".

He told reporters that it was "clear that we can't have a different deal or different outcomes for different parts of the UK", and added that it would be a "disadvantage" for Scotland to be outside whatever new relationship the UK negotiated with the EU.

This echoed earlier comments from Scottish Secretary David Mundell, who told MSPs that while Scotland's concerns would be "right at the heart of the process", there would be no "special deal".

Meanwhile, the Scottish Conservatives accused the Scottish government of putting forward "evidence-free assertions" and said a separate Scottish deal would create a trade barrier between Scotland and England.

Scottish Labour said that while it wants to retain access to the EU single market, the UK remains Scotland's most important market and repeated its call for Ms Sturgeon to rule out a second independence referendum.

The Scottish Greens said it was clear that the only way to guarantee Scotland's European future, defend workers' rights, environmental protections and freedom of movement was as an independent nation within the EU.

And the Liberal Democrats said the report was an "expensive exercise in Christmas window dressing, as the only option the first minister really wants to succeed is Scottish independence."