It started so well. A slick campaign video. A confident message about the experience needed to deliver a strong economy and Scottish independence. Endorsements from MSPs and ministers. It looked like Kate Forbes had a very good chance of becoming Nicola Sturgeon’s successor and the next First Minister of Scotland.

Then this happened: Ms Forbes was asked about gay marriage and said that, had she been an MSP when it was made legal in 2014, she would have voted against it. The Finance Secretary, who is a member of the Free Church of Scotland, explained that, according to her faith, marriage is between a man and a woman and she would have voted in line with that. She would have voted no.

Ms Forbes said something similar on another important question. In a free society, she said, you can do whatever you want, but for her, sex was for marriage and having children without being married would be wrong. As with gay marriage, she said her position was guided by her faith: “My faith would say that sex is for marriage and that’s the approach that I would practise.”

Read more: Humza Yousaf rejects claims he skipped equal marriage vote because of mosque pressure

No sooner had Ms Forbes made the remarks than it looked like the consequences would be swift. Overnight, she lost several of her endorsements. There was talk of her campaign being in meltdown. She was also forced to say whether she was still in the race and insisted she was “at the moment”.

This weekend, she may feel things are looking slightly better. After the reaction to her comments on gay marriage, she said the campaign would be decided by party members rather than the media or MSPs and the first poll of the contest, although of supporters rather than members, appears to indicate Ms Forbes is ahead of rivals Humza Yousaf and Ash Regan. She may be taking some comfort from that poll after a difficult few days.

But it’s far from over yet. Not only does the poll suggest the race to become First Minister is still open, with 31% of those questioned saying they don’t know who to back, the members of the SNP – indeed, all of us – have to wrestle with some profound questions. What does modern Scotland look like? What do we expect of our First Minister? How important is their position on fundamental rights, some of which have been so recently won. The right to marry who you want, man or woman. The right to bring up your children how you wish. The right of a woman to make decisions about her body. These are at the heart of what Scotland is and will be, and where the leader of Scotland stands on them, and what he or she does about them, matters.

The Herald:

Ms Forbes says politicians must be allowed to have a conscience and must have the right to practise their faith. It would also be wrong to suggest there is unanimity on questions such as gay marriage – quite the opposite: Ms Forbes’s opinions reflect the opinions of many Scots. And it is certainly important – vital – that the Scottish Parliament is made up of men and women of different views and different faiths.

But the question of who leads the country is in a different league because not only is the First Minister an MSP, he or she is the leader of the country and our representative to other nations. Nicola Sturgeon said this week the FM’s views matter because people look to their leader as someone who will stand up for them and their rights and she’s correct. And how would Scotland be seen around the world if we had a First Minister who was opposed to gay marriage?

These are not straightforward subjects obviously, and there have been passionate discussions in The Herald newsroom as there have been all over the country. Ms Forbes also deserves credit for her honesty – she could have tried to bury the issue but didn’t and her rival for the leadership Humaz Yousaf should consider whether he has behaved in the same way. Mr Yousaf said he missed the vote on gay marriage because he had an unavoidable appointment but the former health secretary Alex Neil now says Mr Yousaf arranged a meeting as “cover” to avoid having to vote because he was under pressure from religious leaders. Mr Yousaf must now tell us what really happened and be as open about his views on gay marriage as Ms Forbes has been.

Read more: 'I'll hand independence back to the Yes movement' – vows Ash Regan

However, if the candidates for First Minister must be honest about their religious views – and they must – they should also honestly face the realities of what is required of the leader of a modern, tolerant, and diverse Scotland. Nicola Sturgeon put it well: the people look to the First Minister as someone who will stand up for their rights, which means not only the rights they have currently but also the rights they may need in the future to protect equality for everyone no matter their sex, sexuality or faith. It is a test every First Minister must pass, regardless of whether they are a person of faith or a person of none.

The problem for Ms Forbes is that her views on marriage, sexuality and abortion raise profound questions about whether she can pass that test. She says she would defend the legal right to gay marriage but the right is only on the statute book because politicians and ordinary men and women fought for it. Ms Forbes says she would “uphold the laws that have been hard won, as a servant of democracy” but the deeper question is whether we can have a leader who would not have fought for those laws in the first place. And the job of a First Minister is not only to be a servant of democracy and protect the law as it stands but to be a leader of democracy and fight to change the law when required to protect equality and make Scotland a fairer place.

On abortion for example, the current First Minister has set the right example: she led on the subject of buffer zones around healthcare settings providing abortion services and led a summit on the subject. Ms Forbes has said she too would defend the right of women to make use of the legal right to access abortion but also says she could never conceive of having an abortion herself. That will fairly raise the question in many women’s minds: how strongly would First Minister Forbes defend my rights?

The Herald: Finance Secretary Kate Forbes. Picture: Jane Barlow/PA Wire

It cannot be acceptable that such a question could hang over a First Minister, and the same applies to the question of gay marriage. Every politician, every person, is entitled to hold views guided by faith, but the people of Scotland must have confidence that the man or woman who leads their country will vehemently defend the battles on human rights that have already been won and passionately fight the battles on human rights that are yet to come. And Kate Forbes, although a confident, able minister, fails that test.

To her credit, she has tried to be honest, but equally when asked directly if she agreed with the principle of gay marriage, she appeared unable or willing to answer yes or no and said instead she would defend everybody’s right to live and love free of harassment and fear. However, Ms Forbes, or anyone who seeks to be First Minister, must realise there is a difference between a leader saying they would not undermine the law as it stands and a leader who actively promotes equality on every front. There is still work to be done to make Scotland the most tolerant and equal place it can be and it needs a First Minister who is the right person to lead the country as it tries to achieve that aim.