This article is from the archive of our partner National Journal

Why were Republican legislative leaders in Arkansas and Indiana so blindsided by the backlash against their "religious-freedom" laws that critics view as a license to discriminate against gays?

One reason may be that Republicans in many cases are now literally preaching to the choir: Republican partisans are much more likely to regularly attend religious services than either Democrats or independents. And attitudes about gay rights divide sharply between adults who reliably attend religious services and those who do not.

New data from years of an NBC/Wall Street Journal poll underscore the persistence of a huge religious-practice gap between the parties. Bill McInturff, a cofounder of Public Opinion Strategies, the Republican firm that conducts the poll together with the Democratic firm Hart Research, recently crunched some revealing numbers tracing results from the survey back to 1997.

Today, POS found, 43 percent of Republicans say they attend church once a week or more. By contrast, only 31 percent of Democrats say they attend church that often. Even that number is swelled by the church-going practices of minority Democrats, 44 percent of whom say they attend church at least once a week. Only 23 percent of white Democrats go that often. Among independents, just 25 percent say they attend religious services at least weekly.

(RELATED: Inside Jeb Bush's Stealth Campaign to Woo Christian Conservatives)

Conversely, while only 13 percent of Republicans say they never attend church, that number rises to 26 percent among independents and 30 percent among white Democrats. (Among minority Democrats, 14 percent say they never attend church.)

Church attendance carves a sharp line through attitudes about gay rights. In the latest NBC/WSJ Poll, support for gay marriage among the overall population reached a record high of 59 percent, with only 33 percent opposed. Among those who never attend religious services, 80 percent supported gay marriage with just 14 percent opposed, according to figures POS provided to Next America. Among those who attend services at least weekly, only 36 percent support and 56 percent oppose same-sex marriage.

Religious practice has also become an important predictor of presidential preferences, at least among whites. Through the 1950s and 1960s, polling found that Americans who did and did not attend religious services regularly did not differ in their voting behavior. But: "In every election since 1972 the Republican presidential candidate has won significantly more support from voters who attend church at least once a week than from those who don't," as I wrote in my 2007 book, The Second Civil War. "In every major denomination—Catholic, mainline Protestant, evangelical Protestant—Republicans run better with those who attend church more regularly."

In 2012, for instance, exit polls found that the 42 percent of voters who attended religious services at least weekly preferred Mitt Romney over President Obama by a resounding 59 percent to 39 percent. Obama carried the 40 percent of voters who attend church only occasionally by 55 percent to 43 percent and crushed Romney by 62 percent to 34 percent among the remaining 17 percent who never attend church. Romney's advantage was even greater among regular churchgoers who are white.

(RELATED: Indiana Law Tests Republicans' 2016 Strategy for Social Issues)

One reason the claims of religious liberty in last week's Indiana and Arkansas debates didn't count more against the competing value of equal treatment for all is that the long-term national trend is away from frequent church attendance. The shift hasn't been rapid or sudden, but the direction is clear.

Looking back at multiple polls over the years, POS found that the share of adults who attend religious services at least weekly oscillated only between a low of 37 percent and a high of 41 percent between 1997 and 2007. But since 2008, the share attending at least weekly has more steadily declined, reaching 35 percent in 2012 and 34 percent in 2015. In turn, the share of adults who say they never attend religious services stood at 14 percent in 1997, reached 19 percent for the first time in 2010, and hit 20 percent in 2012, where it remains now.

Slightly more African-Americans report attending church at least weekly today (50 percent) than in 1997 (46 percent). But over that period, white weekly church attendance has dropped from 39 percent to 32 percent. Today, the latest NBC/WSJ poll found, the share of whites who never attend religious services equals or exceeds the share who attend church at least weekly in both the East and the West; only in the Midwest and the South do those who regularly attend church still significantly outnumber those who never darken the doors. (Figures for Latinos are only available since 2005, but the share attending church at least weekly has dropped among them, too, from 49 percent to 42 percent.)

Republicans haven't been immune to this trend, but on a proportional basis, it has affected them less. POS examined the results for the parties from 2005 to 2015 and found that the share of Republicans who attend church regularly dropped from 50 percent to 43 percent, a decline of about one-seventh. Over that same period, the share of white Democrats who regularly attend church dropped by nearly one-fourth (from 30 percent to 23 percent), and the share of independents attending that often skidded by more than one-third (from 39 percent to 25 percent). Minority Democrats saw only a small decline (from 48 percent to 44 percent, a fall of about one-twelfth).

(RELATED: Religion Clashes With Business at SCOTUS)

Over that decade, Democrats (from 15 percent to 24 percent) and independents (from 19 percent to 26 percent) also saw big increases in the share that never attends church. Even the share of Republicans who never attend church is rising (from 9 to 13 percent over the past decade).

Still, these changes leave the 2016 GOP presidential candidates navigating a very different religious landscape than Democrats. Among adults that POS classifies as likely GOP primary voters, a 55 percent majority said they attend church at least twice a month or more, while only 20 percent said they attend church once a year or never. (For Democrats, just 41 percent attend services at least twice monthly, while 31 percent attend only annually or never.)

Those numbers may help explain why virtually every major potential 2016 GOP contender rushed to defend the original Indiana law—even as their Republican colleagues there, facing crushing pressure from business leaders inside and outside the state, undertook a hurried retreat that explicitly prohibited businesses from denying service to gays.

This article is from the archive of our partner National Journal.