The Scottish parliament has voted in favour of making a formal request to the British government to hold a second independence referendum.
MPs voted 69 to 59 for Scottish First Minister Nicola Sturgeon to seek a the referendum next year or in 2019.
Ms Sturgeon's minority government won the vote after the Scottish Green Party backed the move, which Scottish Conservative leader Ruth Davidson described as "regrettable".
Ms Sturgeon said the move was needed to allow Scotland to decide what path to follow in the wake of the Brexit vote, which will see the United Kingdom leave the European Union.
British Prime Minister Theresa May has ruled out holding a second referendum on Scotland's future before completing the Brexit process.
Ms Sturgeon said her mandate for another vote was now "beyond question". She warned it would be "democratically indefensible and utterly unsustainable" to stand in the way.
She told a debate ahead of the vote she was not seeking confrontation with the UK government and only wanted "sensible discussions".
"The people of Scotland should have the right to choose between Brexit - possibly a very hard Brexit - or becoming an independent country, able to chart our own course and create a true partnership of equals across these islands," she said.
"I hope the UK government will respect the will of this parliament. If it does so, I will enter discussion in good faith and with a willingness to compromise."
The first minister is expected to make the formal request for a section 30 later this week - after Mrs May formally starts the Brexit process on Wednesday by triggering Article 50.
Scotland voters rejected independence from the United Kingdom in 2014.