The deputy Westminster leader of the SNP has torn into Kate Forbes’ opposition to equal rights – insisting the party leadership candidate has “alienated swathes of the population" and put the independence cause at risk.

Ms Forbes, who announced on Monday she is vying to replace Nicola Sturgeon, sparked anger after stating she would not have voted in favour of equal marriage if she had been an MSP when Holyrood approved the legislation in 2014.

She caused further anger by then stating that having children outside of marriage was “wrong”.

The Highlands MSP is a member of the socially-conservative Free Church of Scotland, which has condemned the backlash as an “anti-Christian intolerance”.

Ms Forbes team accused opponents of a “witchhunt”, but doubled down on the comments.

Read more: SNP politicians drop Kate Forbes support after gay rights opposition

The Finance Secretary said she was left “heartsore” by the response to her moral views.

But Mhari Black, the SNP deputy leader at Westminster, said Ms Forbes’ comments left her feeling “incredibly hurt”, adding that “like most people in Scotland” she “could not care less about someone’s religion”.

Ms Black, a prominent LBGTQ rights campaigner within the SNP, said that people are entitled to their religious views and can stick by them on a personal basis.

But she added: “However, the moment you use your religion to justify voting against me having access to any of the above, then it is you who is showing intolerance.

“What you practice in your own time, and how you subscribe to live your life is your business, but as a lawmaker, if you choose to allow your religion to try and deny me my basic human rights, then you make it my business.”

Read more: Kate Forbes: I would have voted against equal marriage

Ms Black said that claims Ms Forbes is being “persecuted” or there is a “plot against her” is “utterly fanciful at best and a dangerous conspiracy theory at worst”.

She said: “Holding candidates to account and scrutinising what they have said themselves - on camera, voluntarily, as a pitch to be the next FM of Scotland - is not abuse.

“Had a candidate said they do not believe in racially mixed marriages we would rightly be horrified - so why is my marriage still considered fair game?

“How I, and others, are expected to have faith in a leader who unashamedly and publicly believes the love between my wife and I should not be legally recognised, is beyond me.

“Where there has since been shallow calls for, and promises of tolerance made, I find myself thinking of what Humza has said and understood for years: I don’t want to be tolerated, I want to be equal.”

Read more: Former SNP minister challenges Yousaf's gay marriage vote excuse

Ms Black then turned to the impact Ms Forbes’ views could have on the independence campaign if she is appointed first minister and essentially heading the Yes campaign.

She said: “Kate hasn’t just jeopardised a lot of activists and members, she has alienated swathes of the population before she’s even started.

“We need and should expect, better judgement, communication, and leadership skills if we are to ever convince others of independence.”