Scotland will become the first part of the United Kingdom to legalize same-sex marriage, despite stern opposition from both the Church of Scotland and the Catholic Church.

Government ministers said they will bring a bill on the issue to Holyrood soon, following extensive consultations with the public. Up until now, gay couples in Scotland had the right to enter into civil partnerships.

However, religious bodies will not be forced to conduct ceremonies for gay marriages if they so wish.

We are committed to a Scotland that is fair and equal and that is why we intend to proceed with plans to allow same-sex marriage and religious ceremonies for civil partnerships -- we believe that this is the right thing to do,” said Scotland's deputy first minister, Nicola Sturgeon.

We are also mindful of the fact that the leaders of all of the other parties represented in parliament support same-sex marriage and that there is significant parliamentary support for legislation.

Sturgeon added: The Scottish government has already made clear that no religious body will be compelled to conduct same- sex marriages and we reiterate that today. Such protection is provided for under existing equality laws. However, our view is that to give certainty on protection for individual celebrants taking a different view from a religious body that does agree to conduct same sex marriages, an amendment will be required to the UK Equality Act.

Tom French, policy coordinator for the Equality Network, said he expected same-sex marriage to become fully legal in Scotland sometime next year.

The UK government (which represents England and Wales) is expected to pass same-sex marriage by 2015.

Coincident with the news that same-sex marriage will become legal in Scotland, Philip Tartaglia, the Archbishop-Elect of Glasgow, is coming under fire for apparently homophobic comments he made about former Labour MP, David Cairns.

Cairns, who was openly gay, died in May 2011 from acute pancreatitis at the age of 44.

During a speech on religious freedom and equality at Magdalene College, Oxford University in April, Tartaglia said: If what I have heard is true about the relationship between physical and mental health of gay men, if it is true, then society has been very quiet about it.”

Then, in a direct reference to Cairns, Tartaglia declared: Recently in Scotland there was a gay Catholic MP who died at the age of 44 or so and nobody said anything and why his body should just shut down at that age, obviously he could have had a disease which would have killed anyone, but you seem to hear so many stories about this kind of thing. But society won't address it.

Dermot Kehoe, Cairns’ former partner, condemned Tartaglia’s statements as hurtful and ignorant.

“The Archbishop-elect brought up David Cairns himself,” Kehoe told BBC.

“He wasn't asked about him, he chose to bring him up and essentially he implied that David's death was due in some way [to] homosexuality and his being gay. This is not only in complete ignorance of the facts in this case.

Kehoe added: This has not only upset me and David's family, but it added to our grief and pain and he [Tartaglia] hasn't shown any contrition for doing this.

A spokesman for Tartaglia responded: The Archbishop-elect's words have been taken out of context. They were made in answer to an audience question at a lecture he gave on religious freedom in Oxford 14 weeks ago. He had no previous knowledge of the question, which was not related to his speech. In his reply he mentioned a situation he had been closely involved in, namely the funeral arrangements for the late David Cairns. The archbishop knew David Cairns, met him regularly at events… and got on well with him, and was personally involved in his funeral arrangements. He is sorry for any hurt which has resulted, there was certainly no offence or judgment intended in his words.

Tartaglia is also a fierce opponent of same-sex marriage.