Legislation to enable a second referendum on independence has been published by the Scottish government, as Nicola Sturgeon said another vote before 2021 would give Scotland “the opportunity to choose to be an independent European nation – rather than have a Brexit future imposed upon us”.

The framework bill, published on Wednesday, comes after the Scottish National party secured a record three MEPs and its highest European parliament vote at 38%, boosted by the first minister’s clear pro-remain campaigning, in which Sturgeon urged voters to support her party whether or not they were pro-independence, to send a convincing message about Scotland’s opposition to Brexit.

In a statement to Holyrood on Wednesday afternoon, the Scottish government’s constitutional relations secretary, Michael Russell, described the EU election result as a “fresh start”. He argued Scotland had stated “loudly and clearly that it was a European nation”, adding that the conditions for holding a second independence referendum, set out in the SNP’s 2016 manifesto, had now been “met in full” as the UK headed for a no-deal Brexit.

The referendums (Scotland) bill does not specify the date, question or referendum period, which would all be set by secondary legislation. Sturgeon has previously committed to securing the necessary transfer of powers from Westminster before holding a vote, something Theresa May has consistently stated she would refuse if requested.

The SNP leader said: “We will seek agreement to a transfer of power at an appropriate point to enable an independence referendum that is beyond challenge to be held later in this parliament. It is essential the UK government recognises that it would be a democratic outrage if it seeks to block such a referendum. Indeed, any such stance would, in my view, prove to be utterly unsustainable.”

Following the publication of the bill, three of the candidates to replace May as Conservative leader: Rory Stewart, Sajid Javid and James Cleverly, said they would block any request from Sturgeon to hold another independence referendum.

Sturgeon, who first announced she wanted new legislation for a second referendum in June 2016, immediately after the UK voted to leave the EU, added: “Now, more than ever, it is essential that we keep Scotland’s options open so that people have the opportunity to choose a better future.

“Throughout the Brexit process, Scotland has been treated with contempt by Westminster, and our efforts to find compromise and protect the interests of the people of Scotland, who voted overwhelmingly to remain in the EU, have been ignored.”

Outlining her intention to publish the legislation last month, Sturgeon insisted a second independence referendum must be held before the next Holyrood election in May 2021 if Brexit went ahead, but has since revised her position, suggesting she would still push for another vote if the UK were to remain in the EU.

While recent polling has shown a slight lift in support for independence, she cautioned party activists at last month’s SNP conference about the need to build popular support for their cause.

As a challenge to critics who have warned independence would result in billions of pounds in spending cuts, Sturgeon announced at the conference a new campaign on the economics of independence, launching this summer, including a guide on the subject for all 2.4m Scottish households.

The proposed bill is intended to become law by the end of this year, and is expected to pass without difficulty given Holyrood’s pro-independence majority between the SNP and Scottish Greens.

In his statement to MSPs, Michael Russell said one of the key lessons from Brexit was that “there is a need for reconciliation”. He said the Scottish government was trying “to get away from the negativity and nastiness of the current Brexit process” through a package of proposals, including cross-party talks to discuss Scotland’s constitutional future, and a citizens’ assembly, based on the Irish model, which was used successfully in reforming Ireland’s abortion laws.

Responding to Russell’s statement, the Scottish Conservatives constitution spokesman, Adam Tomkins, accused the SNP government of “laying the ground for a ‘wildcat’ second referendum on independence”.

Describing the bill as “a power grab on an industrial scale”, Tomkins warned: “It’s not about the democracy of letting people decide in a lawful referendum – it’s about the diktat of an independence-obsessed first minister.”