NICOLA Sturgeon has said she is ready for a court battle with Boris Johnson over indyref2 but only as a last resort. 

In a speech laying out her next steps in the battle for independence, just hours before the UK leaves the EU, the First Minister said the issue of whether the Scottish Parliament could organise a referendum without Westminster's permission had "never been tested in court."  

However, the First Minister also warned her supporters that the "outcome would be uncertain" and that it could damage the cause. She said that at the moment, the Yes movement should use their "energies differently." 

The First Minister also appeared to accept that the referendum might not now happen until after next year's Holyrood election.

Speaking at the Dynamic Earth in Edinburgh, the First Minister told supporters, SNP colleagues and journalists that it could not be claimed “definitively” that a Holyrood organised “indyref2 would not be legal, but equally it cannot be described as being beyond legal doubt."

READ: Nicola Sturgeon's address on Brexit and indyref2 in full

She added: "If a proposal for a referendum on that basis was brought forward it would be challenged in court.

"If a court ruled that it was legal, it wouldn’t be a ‘wildcat referendum’ as our opponents like to brand it – it would be within the remit of the Scottish Parliament.

"Now, should the UK Government continue to deny Scotland’s right to choose, we may reach the point where it is necessary for this issue to be tested. I am not ruling that out."

Answering questions from media, the First Minister said the issue of a consultative referendum would be kept in constant review. 

The SNP leader wants to hold a vote on independence this year, but Johnson has categorically ruled it out, telling the the First Minister that he could not “agree to any request for a transfer of power that would lead to further independence referendums”

Sturgeon accused the Prime Minister of being scared. 

“The Tory position is a sign of weakness not strength,” she said. “If they had any confidence in the argument for the Westminster union, they would have no problem with the people of Scotland having the right to choose. It is the fear of defeat that is making them so desperate to deny us the choice.”

The First Minister said her position was realistic rather than cautious. 

“For me to pretend that there are shortcuts or clever wheezes that can magically overcome the obstacles we face would be to do the independence cause a disservice.

“My job instead is to offer a path that can deliver independence.

“To achieve independence, a referendum, whenever it happens – whether it is this year as I want, or after the next Scottish election – must be legal and legitimate. That is a simple fact.

“It must demonstrate clearly that there is majority support for independence. 

“And its legality must be beyond doubt. Otherwise the outcome, even if successful, would not be recognised by other countries.”

The SNP leader said her party and the Scottish Government would now “step up work on building the substantive case for independence.”

READ MORE: Scottish independence supporters react to Nicola Sturgeon's speech

This would involve the publication of a new series of papers under the banner “New Scotland” to provide “detail on how Scotland can make the transition from a Yes vote to becoming an independent country.”

She also committed to doubling the SNP campaign budget to “support new independence materials, local newspaper adss and a new campaign film focused on undecided voters.”

The First Minister also pledged to establish a new Constitutional Convention made up of all Scotland's elected representatives to "come together to endorse a modern Claim of Right for Scotland through a new Constitutional Convention." 

This would, she said, "declare that it is for the Scottish Parliament to decide whether and when there should be an independence choice and build support for that principle amongst civic Scotland."

The First Minister also said the government would ask "the Electoral Commission to re-test the question - ‘should Scotland be an independent country’," so that it is ready for whenever the vote happens.