FREEDOM of religious expression is a cornerstone of a liberal and civilised society, as is equality.

When equality for one person erodes the religious freedom of another, clear moral thinking is required.

A referendum is not the best way to achieve that but in calling for a public vote on the legalisation of same-sex marriage (which attracted three times the number of submissions to the consultation as that on the independence referendum), Cardinal Keith O'Brien, Scotland's most senior Roman Catholic, has crystallised the dilemma facing Alex Salmond and his cabinet ministers on the issue.

They were expected to publish yesterday the response to the consultation on same-sex marriage and their decision on whether to proceed with legislation. Instead, the matter has been remitted to a cabinet sub-committee with a commitment that a decision will be announced and the responses published by the end of this month. That particular details require further consideration seven months after the consultation closed indicates that the political stakes are higher than first thought and that a legal minefield has to be crossed. It also suggests that the SNP – confident that a free vote at Holyrood could overcome the problems of religious conscience of MSPs and assuming that a relaxation of social attitudes following the civil partnership legislation in 2005 would carry the legislation – had not done its homework on the legal consequences. For an administration in a parliament that from its inception had compatibility with human rights in its legislative DNA, that is a worrying omission.

The proposal is that faith groups and their celebrants should not be obliged to solemnise the ceremonies but this pragmatic solution could be open to challenge under the equality laws. While same-sex marriage is not a human right, the European Court has stated that, once it is on the statute book, no institution licensed to conduct marriages can have an opt-out. This naturally leaves churches and religious groups alarmed that they or their priests could face legal action if they refused to allow same-sex ceremonies in places of worship.

It seems that religious groups could secure an exemption only by an amendment to equality legislation. As a reserved matter, that would require parliamentary time at Westminster and a Sewel motion to apply in Scotland. David Cameron has stated his support for extending marriage to same-sex couples but might be reluctant to press the issue as it could cause collateral damage inflicted by his right-wing backbenchers.

The issue has ignited a debate between gay rights supporters and the Roman Catholic Church in particular but other religious groups, including the Muslim community, also oppose the proposal and this year's General Assembly of the Church of Scotland affirmed that it understands marriage as a contract between one man and one woman. Supporters of same-sex marriage are equally passionate that the law must be changed on grounds of equality. Religious beliefs which are central to the lives of many must be protected, not least by those who support the legalising of marriage between same-sex couples in the name of liberty. We must not replace one form of discrimination with another.