EDINBURGH, Scotland (CNS) — The Scottish Parliament has passed a bill that will allow same-sex marriages to be performed later this year, but religious organizations have the right not to perform them.

Members of the Scottish Parliament supported the legislation, 105-18, at the end of a Feb. 4 debate and applauded when the result was announced.

Lawmakers had rejected pleas from the Catholic Church to oppose the Marriage and Civil Partnership (Scotland) Bill and also resisted attempts to amend it.

The bill will be sent to Queen Elizabeth II for the formality of royal assent before it will become law, with the first same-sex marriages expected in Scotland at the earliest at the end of July.

The Catholic Bishops’ Conference of Scotland said in a Feb. 5 statement emailed to Catholic News Service that the bishops were “disappointed” by the outcome of the vote.

“It does not change the church’s understanding of our commitment to the sacrament of marriage,” the statement added.

The bill offers some protection to the churches by not compelling religious organizations to perform marriage ceremonies for same-sex couples but instead allows them to “opt in” to the legislation. Clerics whose religious organization have not opted into the law will not be able to perform same-sex wedding ceremonies.

During the debate, Alex Neil, secretary for health and well-being, said the Scottish Assembly had “got the balance right in the bill.”

“We are extending the rights and freedoms of people of the same sex who wish to be married and to have that marriage recognized by the state,” he said. “At the same time, we are building in necessary safeguards for the rights of those who are opposed to same-sex marriage and who do not wish to perform same-sex marriage, particularly church organizations and celebrants.”

“We are doing a remarkable thing today,” he added. “We are saying to the world, loud and clear, on behalf of Scotland, that we believe in recognizing love between same-sex couples in the same way that we do between opposite-sex couples.”

However, John Mason, Scottish National Party representative from Glasgow, said he was fearful that anyone opposed to same-sex marriage would be victimized if the bill went through without more robust protections.

He unsuccessfully proposed an amendment asking for recognition that “belief in marriage as a voluntary union between one man and one woman to the exclusion of all others for life is a belief worthy of respect in a democratic society.”

“It is an integral tenet of faith for many Christians, Muslims and others as well as the belief of many of no faith position at all,” he said.

Initially, Scottish bishops were extremely vocal about same-sex marriage. At one point, Cardinal Keith O’Brien, then archbishop of St. Andrews and Edinburgh, described same-sex marriage as a “grotesque subversion of a universally accepted human right” that would “shame Britain in the eyes of the world.”

After the cardinal resigned in February 2013 amid allegations that he made sexual advances to seminarians, the Scottish bishops made their views clear through formal channels, such as presentations to government committees, rather than through the media.

Bishop Hugh Gilbert of Aberdeen wrote Jan. 30 to 22 members of the Scottish Parliament whose constituencies fall within his diocese to ask them to amend the legislation if they could not prevent the bill becoming law.

He said he had major concerns over the “category mistake” of trying to redefine marriage and about the adequacy of proposed safeguards for groups and people who held to the traditional understanding of marriage.

“There is a widespread attitude that accuses those unsympathetic to the proposed legislation of bigotry or homophobia,” he said. “This is seriously unjust, and a very real concern.

“It is an irony that a measure aimed at preventing a perceived injustice to a small minority threatens to provoke fresh injustices to a far larger percentage of the population,” the bishop said.

He asked lawmakers to try to protect churches against possible litigation and threats to their charitable status.

He also said parents needed to be protected from attempts to stop them from passing on their “understanding of marriage to children, most notably in faith schools.”

Bishop Gilbert said he also feared that Christians and others might suffer discrimination in their career or workplace, face restrictions on freedom of speech, be denied access to public services or be prevented from fostering or adopting children.

“Sometimes we are assured that these freedoms are already sufficiently guaranteed by law, but others question this,” he said. “The general climate is not reassuring. It would therefore be a real reassurance for those dismayed by this proposed legislation to have their concerns met within the legislation itself.”

Same-sex marriage was legalized in England and Wales in July under the Marriage (Same-Sex Couples) Act, and the first marriages between gay and lesbian couples will be performed in late March.