THE Scottish Government is to bring in a new law that would allow Holyrood to “set the rules” for a future independence referendum.

But the First Minister was warned that ministers could find themselves in court over the legislation.

Addressing MSPs, Nicola Sturgeon said the Government did not need a transfer of power such as a Section 30 order to pass the “framework bill”.

READ MORE: Indyref2: First Minister sets out plans for vote before 2021

But Tory MSP Adam Tomkins disagreed, saying it would plunge Scotland “into yet more constitutional wrangling about legislative competence and constitutional process”.

Sturgeon told the Tory that she had “no doubt” that the bill introduced would be “within legislative competence.”

Though the First Minister said a Section 30 order would be necessary to “put beyond doubt or challenge” Holyrood’s ability to apply the new legislation to an independence referendum.

She added: “If there is to be an independence referendum, we require to legislate for that, as we did in 2014.

“In 2014, we got a Section 30 and then we legislated.

“This time, I propose that we do it the other way around. Why are we doing that? So that we protect the ability of Scotland to avoid Brexit.

“If we cannot do that through our efforts to stop the whole of the UK leaving the EU, Scotland must have the opportunity to protect itself from the damage that Brexit will do – damage to our economy, to our public services and to the opportunities and horizons of this and future generations. I do not call that squandering time. I call that standing up for vital Scottish interests.”

Brexit secretary Michael Russell is to set out the details next month.

Following a vote in Holyrood in March 2017, Sturgeon wrote to Theresa May asking for temporary powers to stage an independence referendum.

May has repeatedly rejected that request, saying now is not the time for another vote.

Analysis: This indyref beacon doesn't clear the Brexit fog

Yesterday, Sturgeon told MSPs that the UK Government’s current position “will prove to be unsustainable.”

She said: “In 2014, the Scottish and UK governments and parliaments – to our collective credit – set the gold standard. Two governments with very different views on the outcome came together to agree a process that allowed the people to decide.

“That is what should happen in the future. It is how we will secure unquestioned legitimacy not just here at home but, crucially, within the EU and the wider international community.”

Tory chief Jackson Carlaw said the “big difference” between now and then was that 10 years ago all parties agreed on the referendum.