Nicola Sturgeon has set out a timetable for a second independence referendum in the wake of the SNP’s triumph in the European election.

On a visit to Dublin, the First Minister said her preference was for a vote in the latter half of 2020, and legislation for another vote would be published at Holyrood on Wednesday.

Opposition parties accused her of “deceit” and of misusing the SNP’s win in the European election, which she had insisted was about Brexit.

Less than a fortnight ago, Ms Sturgeon said voting SNP was the strongest way to send a message that Scotland wanted to Remain “whether you are for or against independence”.

The SNP recorded its best ever result in the European election, improving its share of the vote from 28.9 to 37.7 per cent, and picking up a third MEP to give it half of Scotland’s representation in Brussels.  

Alyn Smith was re-elected and joined by former MSP Christian Allard and former minister Aileen McLeod,  only the SNP’s second female MEP after Winnie Ewing.

Ms Sturgeon said last month she would bring forward a “framework” bill in readiness for a second independence referendum in May, admitting it would need a transfer of power from Westminster to have legal effect.

With Theresa May and her successor as prime minister unlikely to grant a Section 30 order, the referendum bill is essentially a campaign tool for the 2021 Holyrood election. 

Ms Sturgeon’s timetable also indicates the bill is more theatrical than practical, as it implies an unrealistic six to nine-month transition to independence before the election.

The First Minister, who met Taoiseach Leo Varadkar during her Irish trip, said the UK Government had treated Scotland with “utter contempt” through the Brexit process, while Ireland was respected. 

She said: “Suddenly this idea of being a small independent country in the European Union, we only have to look at Ireland to see the benefits of that and many people are having their eyes opened.

“There will be another Scottish independence referendum and I will make a prediction today that Scotland will vote for independence and we will become an independent country just like Ireland, and the strong relationship between our two countries now will become even stronger soon.

“I want to see Scotland having the choice of independence within this term of the Scottish Parliament, which ends in May 2021, so towards the latter half of next year would be when I think is the right time for that choice.”

In a separate BBC interview, she added: “This week we will bring forward legislation to put in place the rules for giving people the choice in an independence referendum over a Brexit future or a future as an independent European nation.”

Speaking to the media at Edinburgh City Chambers, where the results for Scotland were confirmed after the Western Isles declared on Monday morning, Mr Smyth also said Scots wanted to stop Brexit and if that didn’t happen independence was “back on the table”.

He said: “We reserve all our rights to do what’s necessary for Scotland’s best interests. So the independence question is back on the table, as it has been since the EU referendum. 

“We don’t want to see Scotland dragged out of the EU against our will. 

“We were told in 2014 we were a partnership of nations, a partnership of equals, we’re now being told to shut up and get to the back of the bus.

“The people want better than that and they deserve better than that.”

SNP Westminster leader Ian Blackford said the election result had cemented the SNP’s case for another referendum in the event of a no-deal Brexit.

Scottish Tory MSP Maurice Golden said: “The SNP went into this election pretending to voters that it was nothing to do with independence. Yet within hours of it being announced, Nicola Sturgeon is specifically using it to argue for separation.

“That’s fraudulent behaviour from an SNP Government that’s meant to be running the country, not trying to break it up. Voters punished Nicola Sturgeon last time she abused the Brexit process for her own selfish aims.

“They will do so again if this hypocritical deceit continues.”

Scottish LibDem leader Willie Rennie said Ms Sturgeon had told Unionists they “could vote for the SNP with no fear of that vote being misused. I don’t think people will appreciate this.  

“She tried to say that everyone who voted Remain in the referendum had somehow indicated support for independence, and she misjudged that. 

“She shouldn’t misjudge this one as well. “This is about stopping Brexit. That’s the top priority”.

Chief executive of Scotland in Union Pamela Nash said: “The SNP is utterly shameless. Nicola Sturgeon appealed to pro-UK voters to back her in this election, but as soon as the votes are counted the SNP reverts to type to claim a fresh mandate for an unwanted and divisive second independence referendum.

“This election was not about independence, which we know is only supported by a minority of people in Scotland.

“But it’s a stark reminder that the SNP will never stop campaigning to divide us, which is why we must also continue to campaign for a better future for Scotland as part of the UK.”