Humza Yousaf branded Westminster a "foreign government" in a row over gender reforms tonight during the final SNP leadership debate.
The health secretary clashed with Kate Forbes and Ash Regan over whether the Scottish Government should launch a legal challenge over Tory ministers blocking the gender recognition reform (GRR) Bill.
The three SNP leadership candidates were appearing on Times Radio tonight with just days before the race to succeed Nicola Sturgeon finally ends.
Yousaf repeated his pledge he would send Holyrood lawyers to court if he becomes First Minister to try and overturn a blocking mechanism handed down by the UK Government.
A majority of MSPs from across the parties voted to pass the GRR bill - which aims to make it easier for people to change their legally recognised gender - in December last year.
But Alister Jack, the Scottish Secretary, issued a rarely used Section 35 order which prevented it from becoming law amid fears it trampled on UK-wide equalities legislation.
Speaking tonight, Yousaf said: "When it comes to issues of equality, yes, listen to public opinion, but demonstrate leadership on why you agree with something.
"For me, why the parliament has passed this Bill, is because we're making life that little bit easier for the most stigmatised and marginalised group in the country."
Yousaf added: "In terms of the GRR Bill and the Section 35, let me say - the substance of the Bill is not necessarily the relevance here.
"The principle is standing up against that Westminster veto."
Forbes, who previously said that gender reform was "not a priority for the people of Scotland", suggested she would only go to court if there was no alternative.
The finance secretary, who was on maternity leave when the Bill was passed last year, subsequently revealed she had "significant concerns" about the legislation.
She said tonight: "We're in a position, because of the Section 35, where we need to have an answer to resolving it.
"We can either go to court, against legal advice, and spending money that could be used elsewhere in a cost of living crisis, or we can take that legal advice based on the back of it.
"If there is no legal alternative to court, I'll go to court, but I think there is an alternative.
"If we are a party that wants to be independent, a government that wants to be independent, we need to be able to resolve our own challenges ourselves."
Yousaf cut-in: "If we were independent, we would not have a foreign government, for example, coming in and vetoing our legislation."
Regan resigned from her junior ministerial position last year in opposition to GRR.
She said: "I won't be going to court because I think the legal analysis will tell us that we will lose our court case.
"I don't think that shows us standing up for devolution, I think that's something you do only for things where you have the public behind you.
'And it's very clear on this issue the parliament, and the government, is out of step with the public's view on this."
To sign up to the Daily Record Politics newsletter, click here.