Ireland and Scotland will be allies in the Brexit negotiations, Nicola Sturgeon has said.
Scotland's First Minister told business leaders in Dublin that she will argue for the Irish border to remain open in the wake of the UK's departure from the European Union.
The SNP leader continued that the Republic of Ireland and Scotland are already united on virtually every issue of substance relating to Brexit.
After talks with Irish Taoiseach Leo Varadkar - which focused on Brexit - Ms Sturgeon told an audience of about 1,500 business figures that staying in the European single market and the customs union is the obvious answer to the negotiations.
"The fact that the UK Government is committed to leaving the EU means that Scotland - like Ireland, and like Northern Ireland - now faces a dilemma which is not of our choosing. We want to remain a full member of the EU but face being taken out against our will," she said.
"We deeply regret that.
"However, we believe that if the UK is determined to leave the European Union, it should remain a member of the single market and the customs union.
"In my view, that is the obvious compromise solution. It's democratically justified - the vote to leave was a very narrow one across the UK and two of the four nations of the UK chose to remain."
In her speech to the Dublin Chamber, Ms Sturgeon also disputed the Prime Minister's remarks in Florence at the end of September, and claimed that in Scotland many people feel at home in Europe.
The 47-year-old emphasised the social and economic links between Scotland and Ireland, and noted the shared interest in ensuring the growth of a global economy is matched by a focus on inclusion.
Ms Sturgeon said leaving the single market would be deeply damaging for Scotland's businesses, universities, trade and jobs.
"On virtually every issue of substance relating to Brexit, the Irish Government - and the Irish business community as a whole - has an ally in Scotland," the First Minister said.
"Like you, we didn't want Brexit.
"Like you, we support single market and customs union membership.
"And, like you, we know that Ireland's circumstances require particular attention and we will argue strongly for an open border.
"We believe that those positions are in the best interests of Scotland, of Ireland, and of everybody on these islands."
Ms Sturgeon told business figures the global political developments are a challenge to build a fair and inclusive society.
She added: "Scotland certainly hasn't got everything right, but - like Ireland - I think that we are at least facing up to the right issues.
"That's important from a political, social and moral perspective - and it's also crucial to ensuring that our economic policies are successful and sustainable."