The issue of religious beliefs dominated the early stage of the battle to succeed Nicola Sturgeon as Scotland’s new First Minister.

The continuity candidate and favourite to win, Humza Yousaf, described himself on numerous occasions as a practising Muslim. His closest rival was Kate Forbes, a member of the Free Church of Scotland.

Both held opposite views on the issue of same-sex marriage. 

After scraping victory by the thinnest of margins, a photograph of Yousaf performing prayers, inside his official residence of Bute House, went viral.

The 38-year-old has recently attended two receptions marking the end of Ramadan at the Scottish Parliament.

One was hosted by Pam Gosal of the Scottish Conservatives. The second organised by the Muslim Council of Scotland and sponsored by Scottish Labour’s Foysol Choudhury and the SNP’s Kaukab Stewart.

Yousaf’s appointment as Scotland’s first minority ethnic leader was generally well received.

The Secretary General of the Muslim Council of Britain, Zara Mohammed, described it as a “momentous occasion”.

When asked on the BBC what kind of reaction there had been in the Muslim community, she replied: “I think there has been a heightened state of excitement, of delight maybe even a bit of awe.”

Such views were not held by others. There was already some disquiet at his backing of a controversial bill, which would make it easier for people in Scotland to change their legal gender.

However, it was his responses to questions posed by Sky’s Sophy Ridge, widely shared on community forums online, that took condemnation to another level. When asked by Ridge if he thought gay sex was a sin, Yousaf instantly replied “No”.

He continued: “I have been asked that question about 25 times and I have answered it the same way 25 times.

“I can’t change what is in certain faiths. I can’t change what is in scripture. What I can tell you, that the approach I will take, which is that I will not allow personal faith to be the basis of legislation.”

Mohammed Hijab, who has 810K subscribers on his You Tube channel, produced a brazen video entitled “Is Humza Yousaf Muslim?” In it he launched a furious tirade against the SNP leader.

He went on to add that the Catholic Conservative MP Jacob Rees-Mogg had more “fortitude” than Scotland’s Muslim First Minister, when facing a similar question on his attitude towards same-sex marriage.

After facing a backlash, including from those who claimed he had put Yousaf in danger, Hijab appeared in a second video stating his views were “absolutely not a call to violence”.

Despite his clarification one Scottish imam accused him of being “irresponsible.”

He said: “From what I know, he’s done a few Islamic courses, goes down to Speakers’ Corner and films himself giving it the big un.

“He has got no authority to accuse another Muslim of disbelief. He has got every right to put his point of view across, but he needs to be careful in his language. A lot of young, impressionable Muslims follow him on social media.”

Last year Hijab had to refute allegations put to him from Channel 4 News that he was “stirring up” up hatred between Hindus and Muslims, when violence broke out between the two communities in Leicester.

Furthermore, British Islamic scholar Shaykh Abdal Hakim Murad, praised Kate Forbes.

In a tweet shared by news website 5Pillars he said she is “living proof that you don’t need to compromise or sell-out in order to move at the highest level of the British system.”

Whilst some have been outspoken others have taken a conciliatory tone. American theologian and scholar Dr Yasir Qadhi described the commentary on Yousaf becoming First Minister as either “complete jubilation, or absolute condemnation.”

He wrote that “politicians are not scholars – we need to stop expecting them to be the same as preachers”.

He added: “It is sad and inexcusable (even if politically inevitable) that a politician has to pander to certain ideologies that are immoral. There’s no religious excuse for this, and those who choose to compromise on this will have to answer to Allah.

“At the same time if a politician does do this, this doesn’t mean that we now cancel any potential good from them.”