The Church of Jesus Christ of Latter-day Saints did not seem eager to draw attention to its recently updated guidance on gay marriage. In a memo shared confidentially, the church instructed leaders that Mormons in same-sex relationships were to be treated as “apostates.” Children being raised by two moms or two dads, the edict held, should be banished from the church until they become adults and can renounce their parent’s union.

The response of hundreds of members of the church was powerful. In recent days, Mormons have been leaving the church in droves, saying they no longer feel at home in an institution that so resolutely excludes a segment of the population that has become increasingly visible, legally protected and socially accepted in America.

Religious organizations are entitled to set doctrine. Mormon leaders view heterosexual marriage as vital to eternal salvation. But those that continue to label sex between people of the same gender a sin, and perpetuate harmful stereotypes, should expect a reaction from their congregations.

Over the past decade, the Mormon Church has used its social power and its treasury to inject itself into the political fight over gay rights. The church bankrolled California’s Proposition 8, an initiative that sought to invalidate the 2008 court ruling that legalized same-sex marriage in the state. Voters narrowly approved the proposition, a setback that galvanized supporters of gay marriage and shaped the legal and advocacy strategy that led the Supreme Court to legalize gay marriage this summer.