JOANNA Cherry has revealed she threatened to take legal action against the SNP after some of her Westminster colleagues tried to prevent her from speaking at a conference of the LGB Alliance.

During an interview at the Edinburgh Fringe, the SNP MP told how she was invited to speak at the gender-critical charity’s conference a couple of years ago but was “harangued” by fellow MPs in the party who tried to stop her joining a panel of guests at the event.

She said that if they had prevented her from speaking she would’ve said to the party "see you in court”.

“A couple of years ago, when the LGB Alliance held their first conference I was invited to go on a panel of cross-party speakers and a number of my MP colleagues harangued me and tried to prevent me from speaking at the conference and demanded I have the whip removed if I spoke at the conference,” Cherry told the crowd at the New Town Theatre on Thursday.

READ MORE: Joanna Cherry dismisses claim she said Greens deal should be 'ripped up'

“I said I was determined to go ahead and that if the party tried to prevent me I would see them in court.

“I did go ahead and speak at the conference but protesting outside that conference was a straight female MP, protesting the right of lesbians to speak about lesbian rights. In 21st century Britain, I found that shocking.”

During the 70-minute interview Cherry claimed she had been a victim of “homophobia” within her party but the atmosphere within the Westminster SNP group had “palpably changed” under the leadership of Stephen Flynn.

In an intensive discussion about transgender issues, Cherry hit back at her colleague Mhairi Black who said on the same stage earlier this week that transgender people should not be the subject of “intellectual debate”.

Cherry said: “I disagree with Mhairi. I think it is the responsibility of those of us elected to legislate to engage with the detail of legislation and with the consequences of legislation.

The National: Joanna Cherry was interviewed by Graham Spiers Joanna Cherry was interviewed by Graham Spiers (Image: PA)

“It seems to me that what happened at Holyrood [when the Gender Recognition Reform Bill was passed ] was that there was huge focus on advancing the rights of trans people to the detriment other people’s rights.

“Responsible parliamentarians should be able to understand nuance and should be able to understand that rights sometimes may rub against each other and sometimes rights conflict and sometimes we have to look at legislation very carefully and make sure there are not unintended consequences.

“I’m sure lots of people in favour of self-ID were well-intentioned but equally those of us who said ‘hang on a minute there are implications for women’s safety’, we also deserved to be heard and for our concerns to be taken on board and not be branded transphobes and bigots.”

Cherry added she believed the tide was turning in the debate around gender and sex, pointing to Labour’s U-turn on self-ID.

READ MORE: Nicola Sturgeon slams Scottish media for coverage of credit cards row

She said there were many of her colleagues with misgivings about self-ID but were “scared to speak out because they’ve seen what’s happened to me”.

In the build-up to the event, organisers The Stand briefly cancelled the show after staff said they felt uncomfortable working at the event because of Cherry’s views, before it was put back on again after Cherry threatened legal action.

Following the show, The Stand said in a statement: “We are glad to have delivered this show, one of our popular programme of In Conversation With events at our New Town venue.

"This has been a great Fringe so far and we'll continue to work hard to deliver the 1000 plus performances in our busy schedule.”

The SNP have been approached for comment.