Scottish ministers will mount a court challenge to the UK government’s veto of Holyrood’s gender recognition reform bill, setting up the new first minister, Humza Yousaf, for a constitutional showdown only two weeks after his election as SNP leader. Scotland’s social justice secretary, Shirley-Anne Somerville, announced on Wednesday that ministers would lodge a petition for a judicial review of the UK’sScottish secretary Alister Jack’s decision in January to use section 35 of the Scotland Act 1998 to prevent the Holyrood bill from going for royal assent. Citing concerns that the bill would have an “adverse impact” on UK-wide equalities law, the use of section 35 for the first time was described by government sources as “the nuclear option” and marked a significant escalation of tensions over transgender rights reform, which has convulsed the UK and Scottish parliaments in recent months. The bill, which would make Scotland the first part of the UK to introduce a self-identification system for people who want to change gender, was passed by MSPs last December by 86 votes to 39, with overwhelming cross-party support, after six years of consultation and debate. Somerville said the move was necessary to achieve legal clarity on the interpretation and scope of section 35 and its impact on devolution. But the decision risks further inflaming divisions within the SNP, after just over half the membership voted in last month’s bruising leadership contest for candidates who were opposed to a court challenge and highly critical of the substance of the bill, in particular self-identification and the extension of the process to 16- and 17-year-olds. Yousaf was the only candidate to reaffirm Nicola Sturgeon’s vow to fight the veto of the bill she first proposed six years ago and over which she endured relentless and often highly personal attacks. Proponents of the changes say they will streamline a process that many transgender people find intrusive and distressing, but not affect the spaces or services they use in their day-to-day lives. Critics argue that the simplification will fundamentally alter who can access women-only services and leave women vulnerable to abuse by predatory male offenders. The final weeks of Sturgeon’s leadership were engulfed in a furore over the placement of Isla Bryson, a transgender woman found guilty of raping two women before transitioning, in a women’s prison. The Scottish government’s statement on Wednesday did not reference the protection of transgender rights once, suggesting ministers intend to frame the court battle purely as Westminster denying Holyrood its democratic right to make its own laws – only seven months after the supreme court ruled that the Scottish parliament could not legislate to hold another independence referendum without Westminster’s consent. But any hope that legal action might bolster the independence cause is moderated by repeated polling showing the public do not consider it a priority when compared with public service reform or the cost of living crisis. Somerville said: “The use of section 35 is an unprecedented challenge to the Scottish parliament’s ability to legislate on clearly devolved matters and it risks setting a dangerous constitutional precedent. “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.” Jack said the UK government would “robustly defend the decision”. Rishi Sunak, speaking in Belfast, said the decision had been made “after taking very careful and considered advice”. “We had concerns, as the UK government – the secretary of state set this out at the time – concerns about how Scotland’s gender recognition act would interact with reserved powers, about the operation of the Equalities Act, the protection of women elsewhere in the UK as well,” the prime minister said. The leader of the Scottish Conservatives, Douglas Ross, accused Yousaf of “engineering constitutional division to appeal to his divided party and distract from his woeful start as first minister”, while the party challenged the Scottish Labour leader, Anas Sarwar, to confirm his stance on the bill. Scottish Labour finds itself in a difficult position after Keir Starmer called for a “reset” on the bill despite the Scottish party supporting the changes. Scottish Labour’s equalities spokesperson, Paul O’Kane, accused the governments in Westminster and Holyrood of failing trans people and women. “A fraught and expensive legal battle could have been avoided if both of our governments had been more willing to work in good faith to deliver a bill that works for everyone,” he said. “The real questions here won’t be answered in the courts – we need to focus on building consensus and public support for a way forward on reform.” Maggie Chapman, the equalities spokesperson for the Scottish Greens, who made extensive transgender rights reform a red line for the partnership deal that gives the SNP a Holyrood majority, welcomed the announcement, saying: “We cannot allow the rights and lives of trans people to be used as a political pawn in Westminster’s reactionary culture war.” Vic Valentine, the manager of Scottish Trans, said: “Other countries all over the world have introduced similar laws, with the only impact being a positive one on the tiny number of trans people who need legal recognition of how we live our lives, as everyone is entitled to under international human rights law.”