SCOTTISH politics is getting used to constitutional rows that end up in the courts.

These policy disputes have included improving the rights of children with the Scottish Government’s UN Convention of the Rights of the Child Bill – deemed outwith Holyrood’s competence by the Supreme Court.

Now it looks almost certain that the SNP’s gender recognition reforms could also end up with a constitutional wrangle over legislation aimed at improving the rights and dignity of one of Scotland’s most marginalised communities.

READ MORE: Rishi Sunak says it's 'reasonable' for UK to probe gender reforms

Whilst we are used to the UK and Scottish governments locking horns, this latest stand-off takes things to a new level.

The UK Government has used section 33 of the Scotland Act three times, all fairly recently – urging that Holyrood legislation was attempting to extend its powers outside the parameters of devolution.

But the UK Government thinks the gender recognition reforms, while devolved, could have a knock-on effect on legislation reserved to Westminster.

Section 35 of the Scotland Act states that an intervention can be made if the Secretary of State “has reasonable grounds to believe would have an adverse effect on the operation of the law as it applies to reserved matters”.

READ MORE: Gender recognition reforms: A three-day slog to help trans people

But this is not a straightforward power, which has never been used. It would need to go through the House of Commons and the Scottish Government could launch a judicial review in the courts.

UK Government sources have indicated this relates to both the 2004 UK Gender Reform Act that first put in place a process for trans people to obtain a gender recognition certificate.

But the second piece of legislation the UK Government is concerned about is the 2010 Equality Act.

The Equality Act allows circumstances where a single-sex space can prevent, limit or modify trans people’s access to a service.

SNP Civil Justice Secretary Shona Robison has repeatedly made a point of stressing that the legislation does not impact the Equality Act.

The Scottish Government has gone to extraordinary lengths not to spook UK ministers into a potential challenge.

Earlier this week, Mr Robison even removed an amendment that would have acknowledged asylum seekers and their ability to obtain gender recognition, worried it would raise eyebrows from UK ministers that the Bill is attempting to impact immigration policy.

READ MORE: UK Government to investigate blocking gender recognition reforms

In a plea to MSPs this week, Ms Robison stressed that “responsibility for the Equality Act 2010 is reserved to the UK parliament, just as immigration and nationality, including asylum”.

She added: “Any amendment agreed to today that is outwith competence puts the aims of the bill as a whole at risk.”

But the UK Government is clearly not convinced.

One UK Government source said that the Scottish Government may have “unwittingly blundered into a minefield”.

But in a hint that the decision could involve ideology, the source added that “we think the existing system is adequate”, adding that it “takes a good balance” between trans and women’s rights.

The current Tory Government at Westminster unashamedly oppose the principle of self-ID.

But under Theresa May’s premiership, the party was fully signed up to the idea.

Ruth Davidson’s Conservatives at Holyrood were also backers of self-ID for gender recognition.

Douglas Ross has chosen to take a more right-wing path – possibly to win political favour from vocal campaign groups opposing the proposals.

But three of his MSPs backed the Scottish Government’s plans on Thursday – Jamie Greene, Jackson Carlaw and Sandesh Gulhane.

The gender recognition reforms have taken six years to be agreed by MSPs.

But trans people waiting for more dignity face an ever longer wait as the legislation becomes another political football between Scotland’s two governments.