When Massachusetts' top court legalized same-sex marriage a decade ago, opponents correctly argued that the justices were getting ahead of the people, as most Americans opposed the practice at the time.
A decade later, judges and lawmakers who are striking legal barriers to same-sex marriage are barely keeping up. Most Americans -- including Pennsylvanians -- now favor the practice.
And amid that revolutionary shift, religious groups that have been most vocal in opposing homosexuality have suffered brand damage, according to a new poll by the Public Religion Research Institute. Most people think that Catholic, evangelical Protestant and Mormon churches are unfriendly to gays, the survey said, and believe such groups are alienating young people -- an opinion especially strong among young adults themselves, nearly one-third of whom claim no religious affiliation.
And among people who grew up religious and now claim no affiliation, one-quarter of them cited negative teachings or treatment involving gays and lesbians -- hardly a majority, but still significant in the growing secular segment of the adult population.
The Rev. Shanea Leonard, a regional coordinator for Equality PA -- which has advocated for same-sex marriage and other legal protections for gays, lesbians, bisexuals and transgender persons -- said the survey results ring true. "We've alienated mostly people 40 and under," she said.
"Only God can judge," said Rev. Leonard, a Presbyterian minister and pastor of the nondenominational Judah Fellowship Christian Church, a North Side congregation that affirms participants regardless of sexual orientation or gender identity. "We are called to be a place of open arms, to provide healing and a place where they can grow and connect with God."
She also said the report rang true in stating 37 percent of gay, lesbian, bisexual and transgender persons claim no religious affiliation -- close to double the national rate of 21 percent.
There's a misconception, she said, "that if you are part of a same-gender loving relationship or the LGBT community that God is not important to you," she said. "That couldn't be further from the truth."
In many churches, however, "either we wear a mask and hide who we are to fit in that church," she said. Or, "We live a life that runs from any connection to spirituality or God or the church, even though that innate desire is in us."
But Robert Gagnon, a professor of New Testament at Pittsburgh Theological Seminary, said churches should maintain opposition to homosexuality, and shouldn't be surprised that people look negatively on the messenger when they don't like the message.
"Sex is pleasurable. People want to do it," said Mr. Gagnon, a Presbyterian elder. "They regard it as private, even though they want the public to support it. The biggest regulator of sexual ethics in the world is religion, particularly Christianity, which has always had a strong ethic on purity," limiting sexual activity to a lifelong marriage between a man and a woman.
"Basically people feel if they can give a pass to persons engaged in same-sex intercourse, then they pretty much have a pass for their own lives and their loved ones to engage in other forms of sexual activity," said Mr. Gagnon, author of "The Bible and Homosexual Practice," which argues the Scriptures are unanimous in defining such practice as sinful.
But, he said, churches need to reflect on whether they're "not only proclaiming an ethic of sexual purity but also reaching out in love" to violators of that ethic. Also, "Are we looking the other way on the sexual sins we commit while being very hard-line toward sexual sins we don't commit?"
The shift in public opinion on gay marriage is a rare, fast-paced social revolution, according to Robert Jones, chief executive officer of the Public Religion Research Institute. The Washington-based group polled Americans in late 2013 and compared the results with a similar poll done in 2003 by the Pew Research Center.
"Very rarely do we see a shift of this size over 10 years in terms of changing social opinion" in both the "magnitude and the steadiness of the shift over the period," Mr. Jones said.
"Young people have been leading this shift," he said, with nearly 7 in 10 of the youngest adults supporting gay marriage. Also, nearly two-thirds of people say a relative or close friend is gay -- far more than in past decades. Those with such ties are more likely to back same-sex marriage, Mr. Jones said.
The poll found 61 percent of adults in Pennsylvania supported same-sex marriage, with 35 percent opposed. The state's statutory ban on gay marriage is currently facing a court challenge, and Attorney General Kathleen Kane has refused to defend it, mirroring actions by the U.S. Justice Department toward challenges to the Defense of Marriage Act. The U.S. Supreme Court last year struck down that act -- which had denied federal recognition of gay marriage -- on the grounds that it denied equal protection to same-sex couples and was designed to "disparage and to injure" them.
Federal judges followed that precedent in recent weeks to strike down gay-marriage bans in Virginia, Texas, Oklahoma and Utah and required Ohio and Kentucky to recognize such marriages from other states. Appeals are pending.
In 2009, a majority of Pennsylvanians said same-sex marriage should not be recognized. By 2011, a majority said it should, including every age group under 65, with those under 35 agreeing by more than a 2-1 margin, according to a survey by Muhlenberg College Institute of Public Opinion.
And a Franklin & Marshall College Poll in January found a similar reversal over the years, with 57 percent now supporting same-sex marriage.
Support for same-sex marriage has risen among every religious group measured in the Public Religion poll, even those, like evangelical Protestants, where a majority remains opposed. The religiously unaffiliated -- a mix of atheists, agnostics, spiritual-but-not-religious and others not connected to any faith group -- was the only category to support same-sex marriage in 2003, and support there is now at 73 percent.
The results come as these social trends continue to roil religious groups. The Catholic Church is preparing for a synod -- a global summit of bishops -- in Rome on the topic of the family, and it has sought comments from Catholics in advance to help shape the discussion. Pittsburgh Bishop David Zubik, in a report last week on local results, acknowledged widespread dissent among Catholics in their views and practices on marriage and sexuality.
He acknowledged the challenge of presenting "moral principles honestly and completely without watering down the truth but in a way that is not judgmental or perceived to be condemning."
Some Protestant denominations have debated homosexuality for decades. Mainline Presbyterian, Episcopal and Lutheran denominations in recent years began permitting or expanding the ordination of gays and lesbians, the Episcopal Church is drawing up a liturgy for same-sex blessings, and the Presbyterian Church (U.S.A.) is expected to vote this June on whether to change its definition of Christian marriage from that of one man and one woman to that of two persons.
The Rev. Janet Edwards, a Presbyterian Church (U.S.A.) minister and local coordinator of faith-based efforts for Equality PA, said she was encouraged that "faithful people who believe God's loving embrace includes everyone are becoming more and more active in the public square." But Rev. Edwards, who was acquitted in a 2008 church trial after officiating at a same-sex wedding, said there is "a huge amount of work to do because decades of judgment on the part of religious groups have harmed so many."
The Public Religion poll also tracked another social revolution in the making, with half the American public now favoring the legalization of marijuana and just over 40 percent opposed.
That poll also found a majority of Pennsylvanians supporting legalization. But the Franklin & Marshall poll found a strong majority opposed. One possible explanation is that the Public Religion poll surveyed all adults, while the Franklin & Marshall poll covered only registered voters, Jones said. The latter would result in a lower proportion of younger adults, who tend to vote less and puff more -- or at least favor making the latter legal.
Peter Smith: email@example.com or 412-263-1416; Twitter @PG_PeterSmith.