Over the past decade, pollsters charted something remarkable: Americans—long known for their piety—were fleeing organized religion in increasing numbers. The vast majority still believed in God. But the share that rejected any religious affiliation was growing fast, rising from 6 percent in 1992 to 22 percent in 2014. Among Millennials, the figure was 35 percent.

Some observers predicted that this new secularism would ease cultural conflict, as the country settled into a near-consensus on issues such as gay marriage. After Barack Obama took office, a Center for American Progress report declared that “demographic change,” led by secular, tolerant young people, was “undermining the culture wars.” In 2015, the conservative writer David Brooks, noting Americans’ growing detachment from religious institutions, urged social conservatives to “put aside a culture war that has alienated large parts of three generations.”

That was naive. Secularism is indeed correlated with greater tolerance of gay marriage and pot legalization. But it’s also making America’s partisan clashes more brutal. And it has contributed to the rise of both Donald Trump and the so-called alt-right movement, whose members see themselves as proponents of white nationalism. As Americans have left organized religion, they haven’t stopped viewing politics as a struggle between “us” and “them.” Many have come to define us and them in even more primal and irreconcilable ways.

When pundits describe the Americans who sleep in on Sundays, they often conjure left-leaning hipsters. But religious attendance is down among Republicans, too. According to data assembled for me by the Public Religion Research Institute (PRRI), the percentage of white Republicans with no religious affiliation has nearly tripled since 1990. This shift helped Trump win the GOP nomination. During the campaign, commentators had a hard time reconciling Trump’s apparent ignorance of Christianity and his history of pro-choice and pro-gay-rights statements with his support from evangelicals. But as Notre Dame’s Geoffrey Layman noted, “Trump does best among evangelicals with one key trait: They don’t really go to church.” A Pew Research Center poll last March found that Trump trailed Ted Cruz by 15 points among Republicans who attended religious services every week. But he led Cruz by a whopping 27 points among those who did not.

Why did these religiously unaffiliated Republicans embrace Trump’s bleak view of America more readily than their churchgoing peers? Has the absence of church made their lives worse? Or are people with troubled lives more likely to stop attending services in the first place? Establishing causation is difficult, but we know that culturally conservative white Americans who are disengaged from church experience less economic success and more family breakdown than those who remain connected, and they grow more pessimistic and resentful. Since the early 1970s, according to W. Bradford Wilcox, a sociologist at the University of Virginia, rates of religious attendance have fallen more than twice as much among whites without a college degree as among those who graduated college. And even within the white working class, those who don’t regularly attend church are more likely to suffer from divorce, addiction, and financial distress. As Wilcox explains, “Many conservative, Protestant white men who are only nominally attached to a church struggle in today’s world. They have traditional aspirations but often have difficulty holding down a job, getting and staying married, and otherwise forging real and abiding ties in their community. The culture and economy have shifted in ways that have marooned them with traditional aspirations unrealized in their real-world lives.”

The worse Americans fare in their own lives, the darker their view of the country. According to PRRI, white Republicans who seldom or never attend religious services are 19 points less likely than white Republicans who attend at least once a week to say that the American dream “still holds true.”

But non-churchgoing conservatives didn’t flock to Trump only because he articulated their despair. He also articulated their resentments. For decades, liberals have called the Christian right intolerant. When conservatives disengage from organized religion, however, they don’t become more tolerant. They become intolerant in different ways. Research shows that evangelicals who don’t regularly attend church are less hostile to gay people than those who do. But they’re more hostile to African Americans, Latinos, and Muslims. In 2008, the University of Iowa’s Benjamin Knoll noted that among Catholics, mainline Protestants, and born-again Protestants, the less you attended church, the more anti-immigration you were. (This may be true in Europe as well. A recent thesis at Sweden’s Uppsala University, by an undergraduate named Ludvig Bromé, compared supporters of the far-right Swedish Democrats with people who voted for mainstream candidates. The former were less likely to attend church, or belong to any other community organization.)

How might religious nonattendance lead to intolerance? Although American churches are heavily segregated, it’s possible that the modest level of integration they provide promotes cross-racial bonds. In their book, Religion and Politics in the United States, Kenneth D. Wald and Allison Calhoun-Brown reference a different theory: that the most-committed members of a church are more likely than those who are casually involved to let its message of universal love erode their prejudices.

Whatever the reason, when cultural conservatives disengage from organized religion, they tend to redraw the boundaries of identity, de-emphasizing morality and religion and emphasizing race and nation. Trump is both a beneficiary and a driver of that shift.

So is the alt-right. Read Milo Yiannopoulos and Allum Bokhari’s famous Breitbart.com essay, “An Establishment Conservative’s Guide to the Alt-Right.” It contains five references to “tribe,” seven to “race,” 13 to “the west” and “western” and only one to “Christianity.” That’s no coincidence. The alt-right is ultra-conservatism for a more secular age. Its leaders like Christendom, an old-fashioned word for the West. But they’re suspicious of Christianity itself, because it crosses boundaries of blood and soil. As a college student, the alt-right leader Richard Spencer was deeply influenced by Friedrich Nietzsche, who famously hated Christianity. Radix, the journal Spencer founded, publishes articles with titles like “Why I Am a Pagan.” One essay notes that “critics of Christianity on the Alternative Right usually blame it for its universalism.”

Secularization is transforming the left, too. In 1990, according to PRRI, slightly more than half of white liberals seldom or never attended religious services. Today the proportion is 73 percent. And if conservative nonattenders fueled Trump’s revolt inside the GOP, liberal nonattenders fueled Bernie Sanders’s insurgency against Hillary Clinton: While white Democrats who went to religious services at least once a week backed Clinton by 26 points, according to an April 2016 PRRI survey, white Democrats who rarely attended services backed Sanders by 13 points.

Sanders, like Trump, appealed to secular voters because he reflected their discontent. White Democrats who are disconnected from organized religion are substantially more likely than other white Democrats to call the American dream a myth. Secularism may not be the cause of this dissatisfaction, of course: It’s possible that losing faith in America’s political and economic system leads one to lose faith in organized religion. But either way, in 2016, the least religiously affiliated white Democrats—like the least religiously affiliated white Republicans—were the ones most likely to back candidates promising revolutionary change.

The decline of traditional religious authority is contributing to a more revolutionary mood within black politics as well. Although African Americans remain more likely than whites to attend church, religious disengagement is growing in the black community. African Americans under the age of 30 are three times as likely to eschew a religious affiliation as African Americans over 50. This shift is crucial to understanding Black Lives Matter, a Millennial-led protest movement whose activists often take a jaundiced view of established African American religious leaders. Brittney Cooper, who teaches women’s and gender studies as well as Africana studies at Rutgers, writes that the black Church “has been abandoned as the leadership model for this generation.” As Jamal Bryant, a minister at an AME church in Baltimore, told The Atlantic’s Emma Green, “The difference between the Black Lives Matter movement and the civil-rights movement is that the civil-rights movement, by and large, was first out of the Church.”

Black Lives Matter activists sometimes accuse the black Church of sexism, homophobia, and complacency in the face of racial injustice. For instance, Patrisse Cullors, one of the movement’s founders, grew up as a Jehovah’s Witness but says she became alienated by the fact that the elders were “all men.” In a move that faintly echoes the way some in the alt-right have traded Christianity for religious traditions rooted in pagan Europe, Cullors has embraced the Nigerian religion of Ifa. To be sure, her motivations are diametrically opposed to the alt-right’s. Cullors wants a spiritual foundation on which to challenge white, male supremacy; the pagans of the alt-right are looking for a spiritual basis on which to fortify it. But both are seeking religions rooted in racial ancestry and disengaging from Christianity—which, although profoundly implicated in America’s apartheid history, has provided some common vocabulary across the color line.

Critics say Black Lives Matter’s failure to employ Christian idiom undermines its ability to persuade white Americans. “The 1960s movement … had an innate respectability because our leaders often were heads of the black church,” Barbara Reynolds, a civil-rights activist and former journalist, wrote in The Washington Post. “Unfortunately, church and spirituality are not high priorities for Black Lives Matter, and the ethics of love, forgiveness and reconciliation that empowered black leaders such as King and Nelson Mandela in their successful quests to win over their oppressors are missing from this movement.” As evidence of “the power of the spiritual approach,” she cited the way family members of the parishioners murdered at Charleston’s Emanuel AME church forgave Dylann Roof for the crime, and thus helped persuade local politicians to remove the Confederate flag from South Carolina’s Capitol grounds.

Black Lives Matter’s defenders respond that they are not interested in making themselves “respectable” to white America, whether by talking about Jesus or wearing ties. (Of course, not everyone in the civil-rights movement was interested in respectability either.) That’s understandable. Reformists focus on persuading and forgiving those in power. Revolutionaries don’t.

Black Lives Matter activists may be justified in spurning an insufficiently militant Church. But when you combine their post-Christian perspective with the post-Christian perspective growing inside the GOP, it’s easy to imagine American politics becoming more and more vicious.

In his book Twilight of the Elites, the MSNBC host Chris Hayes divides American politics between “institutionalists,” who believe in preserving and adapting the political and economic system, and “insurrectionists,” who believe it’s rotten to the core. The 2016 election represents an extraordinary shift in power from the former to the latter. The loss of manufacturing jobs has made Americans more insurrectionist. So have the Iraq War, the financial crisis, and a black president’s inability to stop the police from killing unarmed African Americans. And so has disengagement from organized religion.

Maybe it’s the values of hierarchy, authority, and tradition that churches instill. Maybe religion builds habits and networks that help people better weather national traumas, and thus retain their faith that the system works. For whatever reason, secularization isn’t easing political conflict. It’s making American politics even more convulsive and zero-sum.

For years, political commentators dreamed that the culture war over religious morality that began in the 1960s and ’70s would fade. It has. And the more secular, more ferociously national and racial culture war that has followed is worse.