The Scottish Government will call a second independence referendum if the UK opts for a so-called "hard Brexit", Nicola Sturgeon has warned.
The First Minister said her administration would work with others "to try to save the UK as a whole from the fate of a hard Brexit", where the country is removed from the single market.
As part of that the SNP leader is demanding new powers for Scotland over issues such as immigration.
But while she accepted that leaving the UK would bring "challenges", she said she would make sure that voters had that choice if the Tory government at Westminster fails to secure a deal that keeps Scotland in Europe's free trade area.
Ms Sturgeon told the SNP national conference in Glasgow that the party would " work with others across the political divide to try to save the UK as a whole from the fate of a hard Brexit".
As part of that she said: " We will propose new powers to help keep Scotland in the single market even if the UK leaves.
"But if the Tory government rejects these efforts, i f 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."
While the UK as as whole opted to leave the European Union in June's referendum, 62% of Scottish voters backed remain, with Ms Sturgeon saying then this made another vote on independence "highly likely".
She has already told the conference the Scottish Government will publish a draft independence referendum bill for consultation next week.
Ms Sturgeon used her closing address to announce a number of new domestic policies, pledging a consultation with parents on how to make childcare more flexible, an "independent, root and branch review of the care system" and an increase in funding for primary care which will see GPs and health centres receive an extra £500 million by 2021.
But with the vote for Brexit dominating much of politics, she also revealed a new four-point action plan designed to boost Scotland's economy and improve exports.
The country is in " a completely new era", she said, adding this would be a " new era for our relationship with Europe and the wider world" that would bring "challenges aplenty".
Leaving the single market would be "disastrous" for the Scottish economy, the First Minister said, adding that work to boost the economy is "even more important now".
Ms Sturgeon stated: "M ore than ever we need to tell our European friends that Scotland is open for business.
"And let me be crystal clear about this - we cannot trust the likes of Boris Johnson and Liam Fox to do that for us.
"So today I can announce a four-point plan to boost trade and exports, by taking Scotland's message, directly and in our own voice, to the very heart of Europe."
The Scottish Government will set up a new Board of Trade, she said, along with a trade envoy scheme where prominent figures from the business world and other communities will help promote Scotland overseas.
A new "investment hub" to showcase the country will be established in Berlin, and the agency Scottish Development International will have its European staff more than doubled.
While she outlined these measures, the First Minister was scathing of the Conservatives, after Theresa May's party discussed proposals to make companies list foreign workers 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, discriminatory" as she told the conference: "L et's be frank, the Tories are no longer the Conservative and Unionist Party.
"After last week, we should call them what they are - t he Conservative and Separatist Party. Or Ukip for short."
The First Minister added: "The difference between the Scottish and Westminster governments is this - t hey are retreating to the fringes of Europe. We intend to stay at its very heart, where Scotland belongs."
With her conference address taking place five months after the SNP won its third consecutive term in power at Holyrood, Ms Sturgeon spent much of it on domestic issues.
With the SNP having pledged to almost double the amount of free childcare eligible youngsters receive to 1,140 hours a year by 2020, she said there would be a national consultation with parents on "how to do things differently" which would make choice and flexibility key priorities.
Ms Sturgeon told the audience: "W e will propose that parents can choose a nursery or childminder that best suits their needs and - as long as the provider meets agreed standards - ask the local authority to fund it.
In other words, the funding will follow the child - not the other way round."
For the very youngest children, the Scottish Government will start to provide Scandinavian-style baby boxes in pilot areas from January 1 2017.
" I don't know about you, but as a first foot offering, I think that beats a lump of coal," she said.
The boxes, which will contain clothes, nappies and other essentials along with a mattress so they can be used a cot, will then be offered to all new parents from the summer.
Ms Sturgeon hailed the scheme as a " powerful symbol of our belief that all children should start life on a level playing field".
The review of the care system will look at its practices, culture and ethos, and will be " driven by those who have experience of care".
The First Minister said: " This is not something that any other country has ever done before. We will do it here in Scotland first."
She announced the review after saying Scotland could not "ignore the reality for too many children in care" that means they are less likely to go to university, more likely to end up in prison and more likely to have mental health problems.
The SNP leader said: "This simply has to change. And I am determined that it will change."
With healthcare shifting from hospitals to the community, she announced a " landmark" commitment to increase spending on GPs to 11% of the frontline NHS budget.
"That's what doctors have said is needed," she stated.
"And it is what we will deliver.
"What that means. By 2021, an extra half billion pounds will be invested in our GP practices and health centres."
Ms Sturgeon spoke about her "determination to build an inclusive Scotland", as she said her belief that the country would become independent was stronger than ever.
She joined the SNP three decades ago as a teenager, and said: " In all those 30 years, I have never doubted that Scotland will one day become an independent country. And I believe it today more strongly than I ever have before."
Scottish Conservative leader Ruth Davidson said: " For all of Nicola Sturgeon's Tory-bashing rhetoric, we're flattered she's chosen to adopt so many of our policies - four in this one speech alone.
"We've spent years arguing childcare funding should follow the child, in August we proposed increasing primary care funding as part of the NHS budget, in September we promoted the expansion of Scotland's overseas trade network, and at our conference we published a list of ways to improve the adoption and care system.
"It's further proof that the SNP has completely run out of ideas, because it only has one - breaking up Britain."
Ms Davidson said the SNP conference had been about " keeping the activists happy with threats of a second independence referendum".
She hit out: " It's clear independence is Nicola Sturgeon's sole priority and her continued brinkmanship over another referendum is hampering Scotland's progress in areas such as the economy, health and education."
Labour education spokesman Iain Gray welcomed the review of the care system, but also called on the Scottish Government "to go a step further and put improving outcomes for looked-after children at the heart of the country's attainment strategy".
Mr Gray also said Labour would "await further detail on the childcare announcement" stressing that for the policy "to be delivered properly, it needs to be funded properly".
But he claimed: " Nicola Sturgeon's speech ignored the huge cuts public services in Scotland are facing; cuts that will hold back ambitions and opportunities for our young people."
On the increased funding for primary care, Labour Holyrood health spokesman Anas Sarwar said: " New funding is welcome, but this is the SNP reversing their own cuts to the budgets of family doctors, having slashed a massive £1.6 billion in the past decade."
He added: " The SNP need to outline where this money is coming from - will it mean further cuts to acute services the SNP told us were safe?"