The Episcopal Church will allow religious weddings for gay and lesbian couples.

At its Episcopal General Convention in Salt Lake City on Wednesday, Episcopalians voted overwhelmingly for the change.

Only a small minority of active and retired bishops of the Episcopal Church (26 out of 129) voted against the change on Tuesday. The following day, deputies approved the changes with a 173-27 vote, the AP reported.

The vote comes just days after the Supreme Court declared gay couples have a constitutional right to marry in all 50 states.

“For the lesbian, gay, bisexual and transgender people in our congregations now know under the eyes of God and in every single state in this blessed country, they are welcome to receive all the sacraments,” said the Rev. Bonnie Perry of Chicago, who is openly gay and married.

Clergy who disagree with the new rules, which take effect November 29, can decline to marry gay couples.

The Episcopal Church is the third mainline Protestant church after the United Church of Christ and the Presbyterian Church (USA) to allow such unions. The Evangelical Lutheran Church in America allows individual congregations to decide the issue.