The Scottish First Minister Nicola Sturgeon has said she wants to hold a second independence referendum by May 2021.
Voters in Scotland chose to remain a part of the United Kingdom in a 2014 referendum - but Ms Sturgeon has said that the 2016 vote for Brexit, which saw Scotland vote in favour of remain, had changed things.
She told Scottish MPs them that the case for independence was now "stronger than ever".
In a speech to the Scottish parliament in Edinburgh on Wednesday, Ms Sturgeon said: "The UK might still leave the EU before October, it might leave in October, it might seek another extension or it might not leave at all.
"This chaos was not an inevitable consequence of the vote to leave the EU. It is down to a toxic combination of dishonesty and incompetence.
"Those who campaigned for Leave in 2016 failed to set out what Brexit would mean in reality.
"To the extent that they made any attempt at all, they misled people.
"The UK government triggered Article 50 before it had answered that question. The Prime Minister then boxed herself in with a series of self defeating and contradictory red lines", she said.
"Throughout all of this, the Scottish government - and our party colleagues at Westminster - have worked tirelessly to help find the best way forward for all of the UK.
"Whatever Scotland's constitutional status in future, it will always be in our interests for all of us on these islands to have the closest possible relationship with the EU."
"We must also consider the best way forward for Scotland in the event that the UK does leave the EU.
"And to ensure that all options remain open to us, the time to do that is now.
"Of course, we must learn the lessons of the Brexit mess.
"Whether we like it or not, the continued lack of clarity around Brexit has implications for Scotland's decision making... But there is, surely, one point of clarity that has emerged over the last three years - even for the most ardent opponent of Scottish independence.
— Nicola Sturgeon (@NicolaSturgeon) April 24, 2019
"The Westminster system of government does not serve Scotland's interests.
"And the devolution settlement - in its current form - is now seen to be utterly inadequate to the task of protecting those interests.
"In other words, the status quo is broken."
She added: "I can confirm that the Scottish government will act to ensure that the option of giving people a choice on independence later in this term of parliament is progressed.
"We will shortly introduce legislation to set the rules for any referendum that is now, or in future, within the competence of the Scottish parliament.
"We will aim for this legislation to be on the statute book by the end of this year."
The next Holyrood elections are due in May 2021.
Responding to the speech, Downing Street said: "As we have been repeatedly clear, Scotland has already had an independence referendum in 2014 and voted decisively to remain in the United Kingdom. This should be respected."
Ms Sturgeon also retweeted an advert from her party's 'Yes Scot' campaign.
It shows a man waking up in Scotland and hearing about how much Brexit is costing, and that Boris Johnson is the favourite to become British prime minister.
A knock on his front door reveals Ms Sturgeon, who simply says: "You know we can do so much better than this.
"Go and get your jacket - it's time".
🏴 Westminster isn’t working for Scotland. We’ve been ignored too often. It’s time for a fresh start – to choose a different and better path.
As an independent country, Scotland’s future will be in Scotland’s hands. Sign here to pledge your support. https://t.co/r3WjSWVjjP pic.twitter.com/OC1XEyUkx9
— Yes (@YesScot) April 24, 2019
A campaign guide, focused on Scotland's economic potential as an independent country, is also to be distributed to every home.
Additional reporting: IRN