Scotland's First Minister Nicola Sturgeon says her government will seek to enter into "immediate discussions" with Brussels to "protect Scotland's place in the EU" in the wake of the Brexit vote.
Ms Sturgeon said she will establish an advisory panel with experts to advise her on legal, financial and diplomatic matters as she seeks to continue Scotland's membership.
Speaking outside her official residence in Edinburgh, the First Minister said her cabinet had agreed to begin work on legislation that would allow for the option of a second independence referendum.
Following a cabinet meeting at Bute House, Ms Sturgeon said: "We are determined to act decisively but in a way that builds unity across Scotland about the way forward.
"As I said yesterday, a second independence referendum is clearly an option that requires to be on the table and is very much on the table.
"To ensure that that option is a deliverable one within the required timetable, steps will be taken now to ensure that the necessary legislation is in place. Cabinet this morning formally agreed that work."
The First Minister added: "Cabinet agreed that we will seek to enter into immediate discussions with the EU institutions and other EU member states to explore all possible options to protect Scotland's place in the EU.
"Over the next few days I will establish an advisory panel comprising a range of experts who can advise me and the Scottish Government on a number of important matters - legal, financial and diplomatic."