The Scottish and UK Governments are set to clash in court after Tory ministers blocked controversial gender reforms passed by Holyrood.
Nicola Sturgeon accused Westminster of launching a "full-frontal attack" on the Scottish Parliament and pledged to defend the legislation.
SNP ministers could demand a judicial review of the UK Government intervention which would see the Supreme Court called on to make a ruling.
Sturgeon said: "This is a full-frontal attack on our democratically elected Scottish Parliament and its ability to make its own decisions on devolved matters.
"The Scottish Government will defend the legislation and stand up for Scotland’s Parliament. If this Westminster veto succeeds, it will be first of many."
It comes after a majority of MSPs had last month voted in favour of legislation to make it easier for anyone in Scotland aged 16 or over to change their legally-recognised gender.
The Gender Recognition Reform (GRR) bill was hailed by equalities campaigners and backed by MSPs from across the five parties at Holyrood.
But Alister Jack, the Scottish Secretary, today said the proposed law had a negative impact on UK-wide equalities laws.
It is the first time the UK Government has used a Section 35 order to strike down an act of the Scottish Parliament since the devolution era began in 1999.
Jack said: "I have decided to make an order under section 35 of the Scotland Act 1998, preventing the Scottish Parliament’s Gender Recognition Reform Bill from proceeding to Royal Assent.
"After thorough and careful consideration of all the relevant advice and the policy implications, I am concerned that this legislation would have an adverse impact on the operation of Great Britain-wide equalities legislation.
"Transgender people who are going through the process to change their legal sex deserve our respect, support and understanding. My decision today is about the legislation’s consequences for the operation of GB-wide equalities protections and other reserved matters.
"I have not taken this decision lightly. The Bill would have a significant impact on, amongst other things, GB-wide equalities matters in Scotland, England and Wales. I have concluded, therefore, that this is the necessary and correct course of action.
"If the Scottish Government chooses to bring an amended Bill back for reconsideration in the Scottish Parliament, I hope we can work together to find a constructive way forward that both respects devolution and the operation of UK Parliament legislation."
Shona Robison, the Scottish Government social justice secretary, said ministers would "take whatever steps we can to ensure that the democratic will of the Scottish Parliament is not frustrated."
The SNP MSP, who guided the GRR legislation through Holyrood, said: "The use of Section 35 of the Scotland Act to stop the GRR Bill from proceeding to Royal Assent is an outrageous decision.
"This is a procedure that has never been used under nearly 25 years of devolution and is contrary to a Bill that was overwhelmingly passed by the Scottish Parliament by members of all parties. This is a dark day for trans rights and a dark day for democracy in the UK.
"As the First Minister said, this is a political decision that is more in keeping with UK Government’s contempt for devolution and the Scottish Parliament.
"We have always been clear that the Bill does not impact on the Equality Act.
"The UK Government had multiple opportunities to comment during the extensive consultation on the Bill and during its passage and we are confident that the legislation as passed is within legislative competence of the Scottish Parliament.
"We will examine the reasons which the UK Government give for their order once we have them, but take whatever steps we can to ensure that the democratic will of the Scottish Parliament is not frustrated."
Maggie Chapman, equalities spokeswoman for the Scottish Greens, said her party would "resist" the decision "every step of the way"
'This is a dark day for our devolution settlement, for democracy, and for trans rights.
"It sets a very alarming new precedent that should concern everyone who believes in devolution and wants the Scottish Parliament to exist."
Scottish Labour politician Monica Lennon described the UK Government’s move to block the gender Bill as "shameful".
The MSP for Central Scotland said the decision was "made for cynical political reasons".
Lennon added: "A bad day for democracy, devolution and for human rights. Anyone thinking the Tories care about women’s rights or the interests of LGBTQ people is deluding themselves."
To sign up to the Daily Record Politics newsletter, click here.