The largest Presbyterian denomination in the US will formally recognise same-sex marriages after decades of debate.
With nearly 1.8 million members, the Presbyterian Church (U.S.A.) is the biggest Protestant group in the US to endorse the ceremonies.
The move was supported by the church's top legislative body last year, but required approval from a majority of the denominations' regional districts.
A New Jersey district delivered the critical vote on Tuesday.
The new church policy reads: "Marriage involves a unique commitment between two people, traditionally a man and a woman, to love and support each other for the rest of their lives."
But the denomination has included a provision that no clergy would be compelled to preside over a gay marriage or host such a ceremony on church property. A number of districts have voted against the rule change.
Presbyterian Church (U.S.A.) approved the ordination of gay pastors, elders and deacons in 2011, which led to many conservative congregations to leave the denomination.
The fracture may have paved the way for the approval of same-sex unions.
The change will take effect June 21.