THE intervention of Muslim leaders in the Scottish local election campaign is a real wild card.

The Glasgow Council of Imams is calling on followers to vote against candidates who support gay marriage. Since all five main parties are more or less committed to legalising same-sex marriage, you might think it a rather pointless recommendation. But in low-turnout contests, which often turn on local or personality issues, it is not inconceivable that there might be an upset in Glasgow, where most Scottish Asians live. The Roman Catholic Church is also calling on followers to oppose gay marriage.

If nothing else it is a timely reminder that this is still a politically fraught issue and that the Scottish Government, as it assesses the results of its recent consultation on same-sex marriage, has yet to put it to bed. For liberals, it is saddening to see members of minority faiths who have been the victims of discrimination in the past calling for discrimination against homosexuals – but there it is. It is equally sad that many Christian people, who profess tolerance and love, seem unable to extend this to homosexuals unless they accept that they are committing a mortal sin. Aren't we all supposed to be sinners?

The voices against gay marriage – saying it will destroy marriage or could lead to people marrying their relatives or even pets – have become increasingly shrill. Cardinal Keith O'Brien has compared legalising gay marriage (but not obliging clerics to conduct ceremonies) to legalising slavery (but not requiring people to keep slaves). He says it would be a "grotesque subversion of a universally accepted human right". How heterosexuals could be deprived of human rights simply because the right to marry is extended to homosexuals is not clear. The majority of the population see no reason why people should be denied the right to marry because they are gay, any more than if they were black or of a particular religion.

It is said that if same-sex marriage were legalised people might want to have multiple marriages. But polygamy is already illegal and will remain so, as will marrying close relatives, animals or objects. It is surely a tribute to the enduring strength of the institution of marriage that members of the gay community are keen be a part of it. How can that possibly undermine marriage? As with women priests and gay ministers, the attitude to gay marriage betrays a fatal inability on the part of the churches – Quakers excluded – to change with the times. They are setting themselves against society at a time when religious faiths need all the support they can get. This is an increasingly secular society, after all, and fewer than 10% of the population actually attend church on Sunday to hear the gospel against gays.

The root of the problem is scripture, and the fact that the Bible says people who commit sodomy should not be allowed to live. But if we were going to condemn people on the basis of Biblical morality then there would be precious few still eligible for entry into God's mansion. People are free to believe what they wish, but they should not be allowed to use it to impose a veto on the rights of people whose lifestyle they dislike.

What bothers me is that these intemperate and illiberal views, from imams or cardinals, seem to go largely unchallenged in public debate other than by gay activists. Where are the politicians of all parties who are so vocal when it comes to defending the rights of women or racial minority groups? Only the Greens have been prepared to address head-on the extreme views being expressed by church leaders. But ignoring these views won't make them go away; it will make those who hold them more homophobic.

The timidity of political leaders has a lot to do with them not wishing to alienate the influential faith lobby groups who claim to command a lot of votes. The SNP in particular is wary of antagonising the Roman Catholic Church in Scotland and its claimed 600,000 followers. The Nationalists have been accused in the past of being anti-Catholic, and Alex Salmond has gone to extraordinary lengths to get on side with that church on issues such as the Act of Settlement. The SNP has also made overtures to Scotland's Asians, who tend to vote en bloc, and are influenced by Muslim clerics.

This caution is understandable, but not acceptable, and it is not good politics. On these moral issues, what is needed is leadership – a clear and unequivocal declaration against discrimination. The leaders of the big four – Labour, Liberal Democrats, SNP and Tories – are all signalling their support privately for legalisation, and the party leaders have signed up to the Equal Marriage Campaign. But they are keeping very quiet about it. David Cameron, by contrast, has made his position clear. "I support gay marriage because I'm a Conservative," he told the Tory Conference. That is what is needed here. The Scottish leaders have sought to introduce gay marriage by stealth, but this has left a moral vacuum in which intolerance has been allowed to flourish.

There is no guarantee that the consultation, which ended in December, is going to support the legalisation of same-sex marriage. Most of the 50,000 submissions are thought to have come from faith groups or members of church congregations. Many of the submissions express concern that gay activists might try to target or seek the prosecution of ministers or priests who refuse to conduct same-sex marriages. But this should never have been an issue. There is no question of forcing ministers to conduct gay marriages. The aim is to amend or repeal the Marriage Scotland Act 1977, which makes it an offence to marry people of the same sex. It is a permissive statute that is sought rather than a duty, and no clergymen or women will be forced to act against their consciences.

By not challenging these myths, by keeping their heads down and hoping to slip it through Parliament without confronting prejudice and unreason, politicians have fallen down on their responsibility as legislators. Essentially this is an issue of segregation, of sexual apartheid even, and it is time that political leaders came out of their closets and said so.