Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

SALT LAKE CITY — Episcopalians have voted to allow religious weddings for same-sex couples, just days after the U.S. Supreme Court legalized gay marriage nationwide.

The vote came Wednesday in Salt Lake City at the denomination's national assembly. The measure passed by an overwhelming margin in the House of Deputies, the voting body of clergy and lay people at the meeting. The day before, the House of Bishops had approved the resolution, 129-26 with five abstaining.

Cámara de Diputados concurre con los Obispos aprobación de la Resolución sobre enmendar el Canon del Matrimonio.#GC78 pic.twitter.com/jK2HWJnqGf — Iglesia Episcopal PR (@EpiscopalPR) July 2, 2015

The New York-based church of nearly 1.9 million members is known for electing the first openly gay Episcopal bishop in 2003. Since then, many dioceses have allowed priests to perform civil same-sex weddings.

Still, the church hadn't changed its own laws on marriage until Wednesday.

Under the new rules, clergy can decline to perform the ceremonies.