The Scottish Episcopal Church has voted to allow gay and lesbian couples to marry in the church, making it the first major Christian church in the UK to do so.

According to the BBC, the vote amends cannon law that says marriage is a heterosexual union. It also places the Scottish Episcopal Church at odds with most of the Anglican Communion.

Clergy will have to “opt-in” to marry gay couples.

“I am very pleased for the couples who can now have their relationships recognized by the church and blessed by God,” said The Right Reverend Dr. John Armes, the bishop of Edinburgh.

"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,” he added.

Last year, the communion sanctioned the U.S. Episcopal Church, the U.S. branch of the Anglican Communion, for its decision to allow same-sex marriages in church.

(Related: Episcopal Church will not reverse gay marriage stand, despite penalty, bishop says.)