THERESA May has set herself on a collision course with Nicola Sturgeon by indicating the devolution settlement enjoyed by Scotland for almost 20 years will be redrawn after Brexit.

The Prime Minister confirmed Westminster would hold onto some powers affecting devolved issues after they were repatriated from Brussels, instead of transferring them to Holyrood.

Ms Sturgeon said earlier this week that all such powers must go to Edinburgh after Brexit, and anything less would be an attack on the “very foundations” of the Scottish Parliament.

She claimed the Conservatives at Westminster wanted to exploit Brexit to “strip” Holyrood of its rightful powers, highlighting control over agriculture and fishing in Scotland as examples.

After Mrs May’s comments to the Scottish Conservative conference, SNP Westminster leader Angus Robertson issued his starkest warning yet on an independence referendum.

He told the BBC’s Daily Politics programme: “If the UK government cannot reach an agreement with the Scottish government to protect our interests in Scotland, there will be another referendum, yes.”

In her speech to activists in Glasgow, the Prime Minister indicated the 1998 devolution settlement across the UK had been overtaken by Brexit and now needed to be rewritten.

Instead of the current division between powers reserved to Westminster and powers devolved to Edinburgh, Cardiff and Belfast, she said she wanted to “ensure that the right powers sit at the right level” once they were repatriated to the UK.

This would “avoid any unintended consequences for the coherence and integrity” of the UK.

She indicated UK-wide positions on aspects of agriculture, fisheries and the environment would help the UK “strike the best possible possible trade deals internationally”.

Although the Prime Minister did not say the word referendum, her half-hour speech was dominated by the prospect of Ms Sturgeon asking voters to take Scotland out of the Union.

Mrs May attacked the SNP’s “obsession” with independence and said: “We cannot allow our United Kingdom to drift apart.”

Under the 1998 Scotland Act underpinning devolution, powers not specifically reserved to Westminster are automatically devolved to Holyrood.

Mrs May indicated the principle would no longer apply after Brexit, and although Holyrood would get more powers after 2019, it would not get everything Ms Sturgeon wanted.

She said: “The devolution settlements were designed in 1998, without any thought of a potential Brexit.

“In areas like agriculture, fisheries, and the environment, the devolution settlements in effect devolved to the legislatures in Edinburgh, Cardiff and Belfast the power to implement EU directives in these areas, within a common EU framework.

“As we bring powers and control back to the United Kingdom, we must ensure that right powers sit at the right level to ensure our United Kingdom can operate effectively and in the interests of all of its citizens, including people in Scotland.

“We must also ensure that the UK which emerges from the EU is able to strike the best possible trade deals internationally.

“In short, we must avoid any unintended consequences for the coherence and integrity of a devolved United Kingdom as a result of our leaving the EU.

"Our aim will be to achieve the most effective arrangements to maintain and strengthen the United Kingdom."

She said no decisions “currently” taken by the Scottish Parliament would be removed from MSPs.

Scottish Secretary David Mundell last month said Brexit may require a new Scotland Act.

Mrs May said she wanted Brexit to benefit the UK as a whole, and her government had adopted a principle of “collective responsibility” to help bind the devolved nations together.

She said: “While fully respecting, and indeed strengthening, the devolution settlements and the devolved administrations across the UK, we must unashamedly assert this fundamental responsibility.

“Scotland stands to benefit from this new approach. In those areas where the UK Government holds the policy levers, we will use them wisely to the benefit of Scottish firms and workers.

“Where the Scottish Government hold the levers, in areas like skills and infrastructure, we will seek to work with them to ensure the best outcomes for Scotland.

“At all times, we will seek to strengthen and enhance the ties that bind us together.”

She ended by urging around 500 delegates at the Scottish Event Campus to make a positive case for the “enduring” Union based on the principles of solidarity, unity and family.

She said: “We are four nations, but at heart we are one people. Let us live up to that high ideal and let us never stop making loudly and clearly, the positive optimistic and passionate case for our precious union of nations and people.”

Former SNP First Minister Alex Salmond called Mrs May’s speech a “power grab”.

He said: “She's actually proposing that if Brexit goes ahead the powers that should come back to Scotland on fishing, farming and a range other issues – she's going to retain them at Westminster, because she likes the look of the Scottish economic zone.

“That's a fundamental attack on the very principle and foundation in statute of the Scottish Parliament of 1999, which said specifically that anything that wasn't reserved to Westminster should be run in Scotland. This is a Prime Minister who is attacking the very foundations of the Scottish Parliament and she'll do it to her cost.”

Scottish Liberal Democrat leader Willie Rennie MSP said: “The Conservatives and SNP are the terrible twins with each behaving as badly as the other.

“Both sow the politics of division, each use the other to make their arguments, none have a real focus on the needs of our security, economy and environment.”

Liberal Democrats will continue to unite people behind the UK and Europe.”

Scottish Labour leader Kezia Dugdale added: “The Prime Minister has undermined the Union at every turn since entering Downing Street.

“She may claim the Union is ‘precious’ to her, but the Prime Minister is the person responsible for putting the Union at risk once again.

“She has allowed Nicola Sturgeon to focus on the constitution rather than fix the problems her government has created in our NHS, schools and communities.”

Scottish Tory leader Ruth Davidson yesterday predicted the pro-Union side would win another referendum if the First Minister went to the country, saying: “I would be confident of victory. We won by 10 points [in 2014]. I think there’s every chance that we would win by a wider margin.”