Legislation has been published that could pave the way for a fresh vote on Scottish independence - with Nicola Sturgeon warning it would be a "democratic outrage" if Westminster were to block a second referendum.

The First Minister spoke out as the Referendums (Scotland) Bill was published, setting out the rules and regulations for any future vote.

But it contained no details on the key issue of when a referendum could be held or what the question would be.

Instead, the Scottish Government proposes that these will be set using secondary legislation, if and when the UK Government grants Holyrood the power to hold another ballot.

But Theresa May has repeatedly refused to grant a Section 30 order for this, declaring "now is not the time" for a second independence vote, and it seems unlikely her successor will change that stance.

Sturgeon, who has already earmarked the second half of 2020 as a possible time for the referendum, said the Scottish Government would "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".

And she insisted: "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."

The publication of the Bill comes in the wake of the European elections - where Sturgeon's ruling SNP increased its share of the vote and won three of the six spots for Scottish MEPs.

That contrasts with the success of Nigel Farage's newly formed Brexit Party south of the border.

Sturgeon has already told how those elections, coming in the wake of Scots voting to remain in the European Union in 2016, have shown a "tale of two countries" within the UK - with Scotland "diverging markedly in our outlook, ambition and vision for the future".

And she stressed: "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."

The First Minister stated: "An independence referendum within this parliamentary term will give Scotland the opportunity to choose to be an independent European nation - rather than have a Brexit future imposed upon us.

"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."

The Bill - which has 42 separate sections - provides a "legal framework for the holding of referendums on matters that are within the competence of the Scottish Parliament", accompanying papers said.

These made clear: "The main policy objective of the Bill is to ensure that future referendums on matters that are within the competence of the Scottish Parliament maintain the high standards achieved by the referendum on Scottish independence in 2014."

"They also stipulated that determining what questions are to be asked of voters, Scottish ministers "must consult the Electoral Commission".

While having the UK Government legislate for future referendums would be a "alternative approach", Scottish Government papers stated: "This would not be an effective or acceptable option.

"The Scottish Parliament should set the rules for referendums within its legislative competence, as this is the only legislative approach that respects the rights and role of the Parliament."

Constitutional relations secretary Michael Russell said that "although referendums have become an increasingly common feature of UK democracy, it is a long time since the framework governing them was last comprehensively reviewed".

He added: "Introducing a standing framework for referendums is a reasonable thing for any country or Parliament to have and this legislation will put Scotland in the same position as the UK and many other countries."