The Scottish Episcopal Church has voted to allow gay couples to marry in church.
It makes it the first major Christian church in the UK to allow same-sex marriages.
The vote to amend canon law on marriage, removing the stipulation that it is between a man and a woman, was carried by the Synod in Edinburgh.
It means that gay Christians from any Anglican Church can now ask to be married in a Scottish Episcopal Church.
Clergy who wish to officiate at gay marriages will have to “opt-in”.
The church said this meant that those who disagreed with gay marriage would be protected and not have to act against their conscience.
The Episcopal Church’s Bishop of Edinburgh, The Right Reverend Dr John Armes, said: “I am very pleased for the couples who can now have their relationships recognised by the church and blessed by God.
“I’m also pleased for what this means about our church and the way we have been able to do this. But obviously any change like this creates pain and hurt in some as well, so as a bishop of the church I feel for them.”
The vote to allow same-sex marriage – which required the backing of at least two thirds of each house of Bishops, Clergy and Laity – has left the church at odds with most of the rest of the worldwide Anglican Communion.
A group of global Anglican traditionalists have now announced that they will appoint a missionary bishop “to serve the needs of those who oppose gay marriage”.
A senior figure in the group, Archbishop Foley Beach, said: “Today’s decision by the Scottish Episcopal Church to change the biblical and historic definition of marriage has highlighted the need to respond to the cries and pleas of those Scots who today have been marginalised by their leaders.
“The attempt to redefine marriage is not one that a faithful Christian can support.”
At last year’s Synod, members of the Church agreed to send the issue for discussion to its seven dioceses.
Six of them voted in favour of amending the law. Only Aberdeen and Orkney voted against the proposal.