The UK government has formally notified the Court of Session that it will contest the Scottish government's legal bid to overturn its block of Holyrood's much-debated gender reform bill.
In January Scottish Secretary Alister Jack used a Section 35 order to veto the Scottish Parliament's Gender Recognition Reform (Scotland) Bill.
The Scottish government announced last month it intended to challenge the block in court.
On Thursday, a UK government spokesperson said: "The UK government will robustly defend the Secretary of State's decision to prevent the Scottish government's Gender Recognition Reform Bill from becoming law.
"We are clear that the proposed legislation would have an adverse effect on reserved matters, including on the operation of the law as it applies to Great Britain-wide equalities protections."
The controversial bill was passed by MSPs just before Christmas.
It aims to simplify the process for trans people to change gender in the eyes of the law.
No diagnosis or medical reports would be required, and the period in which adult applicants need to have lived in their acquired gender would be cut to three months.
Sixteen and 17-year-olds applying for a gender recognition certificate would have to live in their acquired gender for at least six months.
Critics have argued it undermines women's rights and single-sex spaces.
At the beginning of the year it became a constitutional dispute when the UK government took the unprecedented step of using Section 35 of the Scotland Act to block the bill from receiving royal assent and becoming law.
Mr Jack claimed the bill clashed with UK-wide equality laws, and differing systems of gender recognition north and south of the border would create "significant complications".
The bill has been a contentious issue within the SNP.
In October last year, Ash Regan quit as community safety minister shortly before MSPs began debating the first stage. A total of seven SNP MSPs broke the whip to vote against it.
During the SNP leadership contest, First Minister Humza Yousaf was the only contender to back action if legal advice supported the move.
Ash Regan believed any court challenge would fail, while Kate Forbes pledged to amend the legislation to ensure it could not be blocked again.
Social Justice Secretary Shirley-Anne Somerville confirmed last month that the Scottish government would lodge a petition for a judicial review over Westminster's veto of the bill.
Ms Somerville said: "The UK government gave no advance warning of their use of the power, and neither did they ask for any amendments to the bill throughout its nine-month passage through parliament.
"Our offers to work with the UK government on potential changes to the bill have been refused outright by the secretary of state, so legal challenge is our only reasonable means of resolving this situation."