Scottish National Party leader Nicola Sturgeon received a rousing reception at her party conference on Sunday after promising she would keep Scotland at the heart of Europe.
Ms Sturgeon said in her closing speech that the Scottish government will demand new powers for Scotland over immigration and its economy if the UK opts for a "hard Brexit".
She also indicated that Scotland will call for a second independence referendum if negotiations to leave the EU do not work in the country's favour, but many of her own supporters are warning that she must now deliver on this.
She said that while leaving the UK would bring "challenges", she ensured voters would have that choice if the Conservative government fails to secure a deal that keeps Scotland in Europe's free trade area.
"If the Tory government rejects these efforts, if it insists on taking Scotland down a path that hurts our economy, costs jobs, lowers our living standards and damages our reputation as an open, welcoming, diverse country, then be in no doubt Scotland must have the ability to choose a better future.
"And I will make sure that Scotland gets that chance," she said.
While the UK as whole voted to leave the EU in June's referendum, 62 percent of Scottish voters voted remain, with Ms Sturgeon saying then this made another vote on independence "highly likely".
Ms Sturgeon criticised the Conservatives, particularly on their proposals to make companies list foreign workers, which it suggested at its conference in Birmingham.
"The Prime Minister's position on EU nationals shames her and it will be a stain on her government each and every day that it is allowed to continue," Ms Sturgeon said.
She hit out at the Tories, describing their vision for the UK as "xenophobic, closed, inward looking [and] discriminatory".