Kate Forbes has been forced to defend her Christian views about homosexuality and same-sex marriage after launching her campaign to become next leader of the SNP.
The Scottish Finance Secretary belongs to the Free Church of Scotland, known for its traditionalist stance on these issues.
She was grilled on her beliefs in an interview by Scottish news channel STV in which she said that if she had been around 10 years ago, she would have voted against same-sex marriage.
She said she was "a servant of democracy" and "would defend to the hilt" someone's legal right to enter into a same-sex marriage, and asked that others would do the same for her in terms of her right to follow her conscience and Christian beliefs.
"I would have voted in line with my conscience on a position which is actually echoed across most major faiths in terms of Islam, Judaism and so on," she said.
"As a practising Christian, I can tell you what I practice, which is that marriage is between a man and a woman."
Interviewer Colin Mackay asked Forbes if she was meaning that "legally, you accept gay marriage, but morally, you don't accept gay marriage".
In reply, she said she hoped that "that is possible in a pluralistic society."
"Politicians should have integrity to say what they believe, how they believe it and to act on that. And if I can defend their right to hold a view, can they defend my right?" she said.
The 32-year-old went on to say that the backlash over her views was drawing out "a fascinating question at the heart of Scottish political discourse, which is what does liberalism mean?"
"Have we become so illiberal that we cannot have these discussions or some people are beyond the pale?" she said.
"If some people are beyond the pale, then those are dark and dangerous days for Scotland."
Later in the interview, Forbes was asked about her views on a gay conversion therapy ban and abortion clinic buffer zones.
She said that she was opposed to women being subjected to "fear and harassment".
"You absolutely would not oppose buffer zones?" asked Mackay.
Forbes replied: "No, and I've never said that."
Regarding a conversion therapy ban, she said, "I would absolutely, wholeheartedly condemn coercion of any kind when it comes to people's sexuality."