The Scottish government has published legislation to set the rules for an independence referendum.
The Holyrood parliament has said the Referendums (Scotland) Bill will provide "a legal framework for the holding of referendums on any matters within Scotland's control."
It is hoped the bill will have completed its parliamentary progress by the end of this year.
It includes provision for the date, question and referendum period to be set by secondary legislation.
For a referendum on independence, it is proposed this would take place following a transfer of power - ensuring such a referendum could not be legally challenged.
The aim of the bill is to provide clarity on the process for voters, campaigners and those administering the process.
On the bill, Scotland's First Minister Nicola Sturgeon said: "Now, more than ever, it is essential that we keep Scotland's options open so that people have the opportunity to choose a better future.
"An independence referendum within this parliamentary term will give Scotland the opportunity to choose to be an independent European nation - rather than have a Brexit future imposed upon us.
"Throughout the Brexit process, Scotland has been treated with contempt by Westminster, and our efforts to find compromise and protect the interests of the people of Scotland, who voted overwhelmingly to remain in the EU, have been ignored."
"We will seek agreement to a transfer of power at an appropriate point to enable an independence referendum that is beyond challenge to be held later in this parliament.
"It is essential the UK government recognises that it would be a democratic outrage if it seeks to block such a referendum – indeed, any such stance would, in my view, prove to be utterly unsustainable."
In a tweet on Wednesday, Ms Sturgeon said: "A majority of Scots - independence supporters and opponents alike - will not accept being told by a Tory PM that we are not 'allowed' to choose our own future".
Memo to Tory leadership candidates: A majority of Scots - independence supporters and opponents alike - will not accept being told by a Tory PM that we are not ‘allowed’ to choose our own future (& PS, you have a lot to learn about good public service delivery from @theSNP gov) https://t.co/khEIWdmvap
— Nicola Sturgeon (@NicolaSturgeon) May 29, 2019
This was a response to UK Home Secretary Sajid Javid, who said: "If I become PM, I won't allow a second Scottish independence referendum".
Mr Javid is one of several people who will run to replace Theresa May as British prime minister next month.
If I become PM, I won’t allow a second Scottish independence referendum. People stated views clearly in 2014, so there should be no second vote. Nicola Sturgeon should spend more time improving public services in Scotland, and less time grandstanding https://t.co/sxKKMdXX2S
— Sajid Javid (@sajidjavid) May 29, 2019
Ms Sturgeon has previously said she wanted to hold a second independence referendum by May 2021.
A campaign guide, focused on Scotland's economic potential as an independent country, is also being distributed to every home.
The 2014 campaign for independence was defeated by 55.3% to 44.7%.