President Trump won the presidency in part because he rallied religious voters with his promise to fill the vacant Supreme Court seat following Justice Antonin Scalia’s death with someone who would protect their values. It is thus ironic that the opinion of Scalia’s replacement, Justice Neil M. Gorsuch, in Monday’s decision holding that the Civil Rights Act of 1964 forbids employment discrimination against LGBTQ Americans, may start the unraveling of the coalition behind Trump — and the Republican Party.

Strongly religious voters have gravitated toward the Republican Party for some time now, but it wasn’t always this way. Ronald Reagan only won 63 percent of evangelical Christians in 1980, and the Republican candidates against Bill Clinton got only 62 and 65 percent in his two races. Clinton won the white Catholic vote, and Reagan won it in his two races by roughly the same margins that he won overall. Catholics did not tilt Republican in the 1980s or 1990s, and the evangelical GOP tilt was significantly less than it is today.

Data from the Pew Research Center shows this started to change in 2000, as the culture war led religious voters to increasingly back Republicans. In 2000, Bush won white Catholics by seven points while losing the national vote by about half a point. That difference between the white Catholic vote and the national vote grew with each succeeding election, rising to 11 points in 2004, 12 points in 2008, and 23 points in 2012. Evangelical voters made a similar shift. They voted for Republicans at a margin of 55 points compared to the entire nation in 2004, 57 points in 2008 and 61 points in 2012. The inference is clear: The more that secular elements within the Democratic Party successfully pushed their cultural agenda, the more religious voters moved to Republicans.

Trump moved these figures to new, astronomical heights. He won 81 percent of the white evangelical vote and 60 percent of the white Catholic vote even while losing the national popular vote by 2 percentage points. White evangelicals voted 67 points more Republican than the nation as a whole, while white Catholics voted 25 points more Republican than the nation. Trump won among the third of voters who attend religious services at least weekly; fully 40 percent of his vote came from the religiously devout.

Concern about the Supreme Court’s role in the culture wars clearly impacted this dramatic shift. The 2016 exit poll found that 21 percent of all voters said Supreme Court appointments were the most important factor in their vote; Trump carried them by a 56 to 41 percent margin. It’s clear that fear of a culturally liberal court drove a crucial number of normally Democratic-supporting white voters to back Trump.

Gorsuch’s decision Monday could throw all of this into the political dustbin. Regardless of the decision’s legal merits, religious voters clearly expected Gorsuch and his fellow Trump appointee, Justice Brett M. Kavanaugh, to oppose progressive attempts to advance their cultural agenda through the courts. “But Gorsuch” was a common phrase used to justify continued support for Trump among religiously motivated voters throughout 2017 and 2018. Now that Gorsuch has proved himself untrustworthy in their eyes, they would be right to question whether Republican assurances meant anything at all. Indeed, Sen. Josh Hawley (R-Mo.), has already said as much on the Senate floor.

Even a small reduction in the Republican margin among the devout will destroy any hope Trump will be reelected. Evangelical voters made up between 21 and 38 percent of the vote in the key Southern states of Florida, Texas, Georgia and North Carolina in 2016. He carried evangelicals by between 64 and 73 points in each state. If his margins among this demographic fell by only 10 points this year, he would lose Florida and North Carolina based on his 2016 result and would even lose Georgia and Texas if the 2018 election returns are a better measure of those states’ current partisan breakdowns.

Trump’s hold on the Midwestern “blue wall” is also imperiled by erosion in religious voters’ support. Wisconsin was 28 percent evangelical in 2016, and Trump carried that group by a 73 to 23margin. Carrying this demographic by anything less — even a 70 to 30 margin — would flip the Badger State blue.

Republicans and Trump will need to confront this challenge sooner rather than later. Trump will need to spend more time shoring up his support among religious voters than he might like, likely stressing religious liberty and pro-life measures. Congressional Republicans would also be well advised to demonstrate their support for measures important to these voters. None of this, however, can fully replace what these voters’ faith in Republicans ability to appoint the right people to the Supreme Court provided. For these voters, Trump and the GOP were tested and found wanting.

Watch the latest Opinions videos:

Read more: