BREXIT will define Scotland and the rest of the UK “for generations to come”, Nicola Sturgeon warned yesterday in an historic address to the Irish Senate.

The first serving head of a foreign government to address the Seanad, the First Minister also confirmed she would publish plans for Scotland to “retain the benefits” of the EU single market within the UK even after Brexit by the end of the year.

READ MORE: Brexit could mean extra £1,500 on new cars imported from EU, Society of Motor Manufacturers and Traders report warns

Ending a two-day visit to Dublin that included meetings with Irish Prime Minister Enda Kenny, President Michael D Higgins and foreign affairs minister Charlie Flanagan, Ms Sturgeon said the “unprecedented times” called for “imagination, open minds and fresh thinking.”

In an upbeat opening, she said relations between Scotland and Ireland were “now stronger, warmer and more harmonious than they have ever been”.

However she told the parliament’s upper house the “deeply unwelcome” Leave vote had created “the greatest foreign policy challenge Ireland has faced since it joined the EU” in 1973.

She said: “For Scotland, too, we know that how we - and indeed the UK as a whole - respond to June's vote will define us for generations to come.”

In anticipation of a hard Brexit, she said: "We are exploring options that would respect the vote in Scotland and allow us to retain the benefits of single market - not instead of free trade across the UK, but in addition to it. The Scottish Government will publish proposals before the end of this year setting out our thinking in further detail.

“These proposals will focus on options for Scotland within the UK.”

The option of Scotland becoming independent also “remains firmly on the table”, she said.

“If the path that the UK chooses to take turns out to be deeply damaging to Scotland's best interests - to our economic, social, cultural and international interests - then the people of Scotland must have the right to choose a different future.

“Of course, we understand that none of what lies ahead will be easy – but then nothing about Brexit is going to be easy.”

The SNP has previously suggested that if Ireland maintains an open border with Northern Ireland after Brexit, Scotland should be entitled to the same arrangement.

However the First Minister suggested the Irish situation might prove unique, not a template.

She said: “Regardless of what agreements may be reached elsewhere on these islands, we will support, unequivocally, an open border here.

“We fully understand that for reasons of geography, history and the simple preservation of peace, Ireland’s circumstances demand close and particular attention.”

The speech was warmly applauded by Senators, many of whom wished Ms Sturgeon’s success in achieving independence.

Senator Mark Daly of Fianna Fail asked how his party and Ireland could help Scotland move towards independence, while Senator Frances Black told the First Minister: “I do wish you all the best in fighting for independence for your country.”

Scottish Conservative leader Ruth Davidson welcomed Ms Sturgeon’s efforts to promote ties with Ireland, and agreed that “in response to Brexit, we all must turn outwards, not inwards”.

But she added: “The problem is that this correct approach is entirely defeated by her own plan to use Brexit to hold a second independence referendum.

“None of the questions thrown up by Brexit will be answered by tearing up our own UK union.”

Earlier, SNP Brexit minister Mike Russell told MSPs that Scotland had “a right” to membership of the EU single market even if the rest of the UK left in a hard Brexit.

He told Holyrood's Economy Committee there should be a “differentiated option” for Scotland is the middle ground between an independence referendum and an "undifferentiated" Brexit, which would see Scotland leave the EU under the same terms as the rest of the UK.

Options might include membership of the European Economic Area, the European Free Trade Association and the Customs Union, but UK willingness would be essential.

READ MORE: Brexit could mean extra £1,500 on new cars imported from EU, Society of Motor Manufacturers and Traders report warns

"We are asking for the things that we already have and enjoy. That is not a special deal, that is, I think, a right that we should have."

However he refused to be drawn on the views of senior politicians who had dismissed a bespoke Scottish deal, including the Labour First Minister of Wales Carwyn Jones and former prime minister of Ireland John Bruton, and insisted: “I am ruling absolutely nothing out."