SNP politicians have pulled their support for finance secretary Kate Forbes’ bid to become the next first minister of Scotland after she revealed her opposition to gay marriage.

Ms Forbes, who is currently on maternity leave, officially launched her campaign to replace Nicola Sturgeon yesterday.

Despite being earmarked as a potential successor to Ms Sturgeon, Ms Forbes has drawn criticism for stating she would have voted against gay marriage if she had been an MSP in 2014.

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

In several interviews on Monday, Ms Forbes, who is a member of the socially conservative Free Church of Scotland, said she would have voted against legislation on equal marriage.

She said: “I believe that it should be a conscience vote because of its profound significance in all mainstream faiths.

"I think for me, Angela Merkel is the example I would follow, I would have voted, as a matter of conscience, along the lines of mainstream teaching in most major religions that marriage is between a man and a woman."

The Scottish Government’s just transition minister Richard Lochhead initially said he was “delighted” that Ms Forbes had thrown her name into the hat to lead the SNP, labelling her “very talented”.

But just 11 hours later, the government minister withdrew his support for the finance secretary.

Read more: Ash Regan will 'immediately pause' national care service plans

Writing on Twitter, he said he had “welcomed my colleague Kate Forbes’ decision to join the SNP leadership contest given her talents”, adding that she had “new ideas and a new approach that we desperately need”.

But he said: “However, I agree we can’t have a party leader who’d vote against same sex marriage.”

SNP MP for Livingstone, Hannah Bardell, accused Ms Forbes of issuing a “hurtful and painful” message to the LGBT community.

In a series of Twitter posts, she said: “I believe firmly in respectful discourse and debate and I have to say I have a level of respect for her being so open and direct about her views and why she holds them but I disagree with her.

“However, I would have hoped that given Kate has so many friends, including myself, who are LGBTQ and hold her and her talents in such high regard, she might have tempered them or at least considered her response a little more carefully.

“She could have perhaps reflected that even though she couldn’t have voted in favour of equal marriage she might understand how hurtful and disappointing that might be to many of us and that she recognises that.”

Read more: Yousaf blasts Forbes: 'I don't use my faith as basis of legislation'

Ms Bardell added: “She might even have recognized that the our values of love and a desire to live free from discrimination are very much aligned.

“Those can’t have been easy words to say as she would have known how hurtful and painful they will be for so many of us.

“I reached out to Kate after she signed the letter on the GRA Bill and she was willing to meet and discuss and listen. I have always respected that.

“I hope in time she might understand why her views are so difficult for so many of us. I’d be very open to discuss it. Progress on equality can never stand still, it must always evolve.”

Writing before Ms Forbes entered the contest yesterday, SNP MP for Perth and North Perthshire, Peter Wishart, said he would “hope that she is not deterred over all this rubbish about her religious beliefs”.

He said: “Value systems inform not dictate and in politics, you are judged on what you do for the people you serve.”

But just nine hours later, Mr Wishart appeared to withdraw that support.

He said: “Kate had every chance to say that she would be prepared to come in behind the party’s social liberal agenda.

“It looks like she wasn’t prepared to take it. There’s only one place to go now.”

SNP Westminster leader Stephen Flynn simply tweeted his support for equality and LGBT rights.

SNP MSP Gillian Martin had also spoken out in support of Ms Forbes’ leadership credentials.

But she later confirmed she is re-considering that support after speaking to the finance secretary.

Ms Martin said: “I too was uncomfortable with Kate Forbes’ responses re equal marriage on TV.

“I have spoken to her, and she knows this.

“I need to sleep and reflect on the assurances she has given me. I don’t like doing this out loud thinking in public, but I think I have a duty to say where I am.”

She added: "We must be full throated in our support of equal marriage. No if or buts.

"I won’t be supporting Kate’s campaign on that basis. I wish her well- she’s extremely talented. But I have red lines. And this is one."