The Church of Scotland has voted in favour of allowing ministers to conduct same-sex marriages.
At the General Assembly of the Church, commissioners voted by 274 to 136 in favour of the move.
In doing so, it becomes the largest church in the UK to decide to conduct same-sex marriages.
It joins others including the Scottish Episcopal Church, the Methodist Church, the United Reformed Church, the Unitarians and the Quakers.
Under the terms of the legislation, an individual would have to apply to the Principal Clerk’s office to become a celebrant and an application would then be made to the Registrar General for Scotland on their behalf.
Only a parish minister who has become a celebrant will be permitted the use of a church building in their charge for the solemnisation of same sex marriages.
Following the announcement, Scottish Greens MSP Ross Greer described it as a “wonderful moment a long time coming”.
Rt Rev Dr Iain Greenshields, Moderator of the General Assembly, said that the Church is committed to ensuring that debates on the subject are held in a “spirit of humility and grace”.
And he explained that no minister of deacon would be required to participate in the solemnisation, or be involved in arrangements for, a same-sex marriage unless they “explicitly” wished to do so.
“The Church of Scotland is a broad church and there are diverse views on the subject of same-sex marriage among its members,” he said.
“There has been a lengthy, prayerful and in-depth discussion and debate about this topic for many years at all levels of the Church to find a solution that respects diversity and values the beliefs of all.
“The Church is committed to ensuring that debates on this subject are held in a spirit of humility and grace, the tone and tenor of discussions are civil and people are respectful of those who hold opposing views.”
The Moderator indicated that celebrants would be expected to take account of the “peace and unity” of the congregation.
“The General Assembly has today approved the Solemnisation of Same Sex Marriage Overture to change a standing Church law to enable Ministers of Word and Sacrament and deacons to apply to become authorised celebrants if they wish,” he continued.
“However, no minister or deacon would be required to participate in the solemnisation of, or be involved in the arrangements for, a same sex marriage unless they explicitly wished to do so.
“All celebrants would be expected to take account of the peace and unity and pastoral needs of the congregation and any parish or other grouping of which it is a part while considering to conduct a same-sex marriage ceremony.”