The UK government has decided to block a controversial Scottish bill designed to make it easier for people to change their legal gender.
UK ministers say the draft law would conflict with equality protections applying across Great Britain.
It is the first time a Scottish law has been blocked for affecting UK-wide law.
Scotland's First Minister Nicola Sturgeon called the move a "full-frontal attack" on the Scottish Parliament and vowed to oppose it.
She said the Scottish ministers would "defend" the bill, warning if the veto succeeded it would be the "first of many".
The Scottish government is expected to challenge the ruling - potentially through a judicial review - but is waiting for more details from UK ministers.
Nicola Sturgeon's government believe the current process is too difficult and invasive, and causes distress to an already marginalised and vulnerable minority group.
The UK government's Scottish secretary Alister Jack will take the legal steps on Tuesday to confirm the move, and set out the reasons for it in a statement to the House of Commons.
In a letter to Ms Sturgeon, he said the bill would have a "significant impact" on protections contained in UK equalities legislation.
He cited concerns over its effect on legal rights to run single-sex clubs, associations and schools, as well as rules on equal pay for men and women.
He added that having "two different gender recognition schemes in the UK" risked creating "significant complications," including "allowing more fraudulent or bad faith applications".
The announcement was greeted with fury by Scottish Social Justice Secretary Shona Robison, who called the decision to block the bill "outrageous".
Arguing that the bill does not affect UK-wide equalities law, she said the "political" move demonstrated the UK government's "contempt for devolution".
"This is a dark day for trans rights and a dark day for democracy in the UK," she added.
This is a major and unique intervention from the UK government.
They have successfully challenged Holyrood legislation before on the basis that MSPs exceeded their powers.
But they have never blocked a Scottish bill on the basis that they think it will have a negative impact on UK law, in this case the Equality Act.
This decision turns a dispute about the process for legally changing gender into a significant constitutional clash between the Scottish and UK governments.
I am told the UK Labour Party will not challenge this intervention, but some Scottish Labour MSPs are furious that gender reforms they helped pass are being stopped.
While UK ministers have suggested the bill could be modified, Scottish ministers have made clear they intend to defend what Holyrood has approved - which probably means this dispute ends up in court.
The Gender Recognition Bill, passed by 86 votes to 39 in the Scottish Parliament last month, would streamline the process in Scotland for changing legal gender.
The bill would lower the age that people can apply for a gender recognition certificate (GRC) - a legal document confirming a gender change - from 18 to 16.
It would also remove the need for a medical diagnosis of gender dysphoria, with applicants only needing to have lived as their acquired gender for three months rather than two years - or six months if they are aged 16 or 17.
Trans campaigners welcomed the bill, however critics of the plans are worried that allowing anyone to "self-identify" as a woman could impact on women's rights and access to single-sex spaces like refuges and changing rooms. 'Political weapon' UK ministers have used a power to block the law under Section 35 of the Scotland Act, the legislation which created a Scottish Parliament with powers to make laws on a range of issues.
If ministers think a Holyrood bill would modify laws reserved to Westminster and have an "adverse effect" on how those laws apply, they can block it. But the power has not been used up to now. Scottish First Minister Nicola Sturgeon has argued there are no grounds for the UK government to challenge the legislation as it falls within the powers of the Scottish Parliament.
She has said any move to block the reforms would be using trans people "as a political weapon". Scottish Labour, who supported the bill at Holyrood, called on Scottish and UK ministers to find a solution to the impasse. Shadow Scottish Secretary Ian Murray added: "Trans rights and women's rights should not be used as an excuse for SNP-Tory attrition warfare".
(c) 2023, BBC