The General Assembly of the Church of Scotland has voted to allow its ministers to be in same-sex marriages.
The gathering, which opened in Edinburgh on Saturday, voted in favour of extending a law passed last May that permits ministers to be in same-sex civil partnerships.
The outcome follows years of deliberation on the issue within the Church.
The decision means the Kirk adopts a position which maintains a traditional view of marriage between a man and woman, but allows individual congregations to “opt out” if they wish to appoint a minister or a deacon in a same-sex marriage or a civil partnership.
Any wider consideration of the theological understanding of same-sex marriage will not take place until the Theological Forum presents its report to the Kirk next year.
Commissioners decided by 339 votes to 215 to allow ministers to be in same-sex marriages.
The Very Rev John Chalmers, Principal Clerk to the General Assembly, said: “We had a debate which made very clear that we were not interfering with our theological definition of marriage and were not going to the place where ministers or deacons could themselves be conducting same-sex marriages.
“It is an entirely different discussion.
“Today’s decision means it will be possible for kirk sessions and congregations to depart from the traditional understanding of marriage to call not only potentially a minister in a civil partnership but one who is in a same-sex marriage.
“In some ways we crossed the Rubicon last year when it was agreed that kirk sessions could call someone in a civil partnership and for many people what today was about was simply tidying up and making the law of the church consistent with Scots law.”
He added: “Today I think people came to this decision with their minds on law and practice and not on theology and future practice.”
Colin Macfarlane, director of charity Stonewall Scotland, said: “Today’s result is great news for the Kirk and a progressive move forward.
“Empowering ministers to live their lives with honesty and integrity sends a powerful signal to faith communities and society as a whole.”
Rev David Robertson, Moderator of the Free Church of Scotland, said it was “saddened” by the decision.