Through his public statements and presidential appointments, Donald Trump is remaking Republican foreign policy in two fundamental ways. The first concerns Russia. Previous GOP leaders like Mitt Romney and John McCain described Moscow as an adversary. Trump describes it as a partner. The second concerns Islam. Previous GOP leaders—most notably George W. Bush—insisted that the U.S. had no beef with Islam, or with the vast majority of Muslims worldwide. Trump and his top advisors disagree. They often describe Islam itself as a hostile force, and view ordinary Muslims as guilty of jihadist sympathies until proven innocent.

On the surface, these two shifts seem unrelated. But they’re deeply intertwined. Before Trump, Republican leaders generally described the United States as fighting an ideological struggle against the enemies of freedom. Now, Trump and his advisors describe America as fighting a civilizational struggle against the enemies of the West. Seen through that very different lens, Muslims look more nefarious and Vladimir Putin looks more benign.

To understand this shift, it’s worth distinguishing two different strains of conservative foreign-policy thinking during the cold war. Civilizational conservatives like Jerry Falwell and Pat Buchanan saw the cold war as a struggle between two countries defined primarily by their view of God: The Judeo-Christian United States versus the atheistic Soviet Union. Ideological conservatives like Paul Wolfowitz and Elliot Abrams, by contrast, saw the cold war as a conflict between two countries defined primarily by their view of government: the liberty-loving United States versus the totalitarian USSR. (A third group, composed of realists like Henry Kissinger and George Kennan, saw the cold war as a traditional great power conflict between two countries defined primarily by their geopolitical heft.)

In the 1990s, after the Soviet Union collapsed, ideological conservatives and civilizational conservatives parted ways. The clearest example was the former Yugoslavia. In the 1990s, Serbs brutalized the largely Muslim breakaway republic of Bosnia. Ideological conservatives like Robert Kagan urged NATO to intervene in the name of human rights. Cultural conservatives like Buchanan wondered why the U.S. was going to war to defend Muslims against Christians. Ideological conservatives saw Russia, Serbia’s traditional ally, as defending tyranny and ethnic cleansing. Cultural conservatives saw Russia as defending Christendom.

For a while, 9/11 papered over these divisions. Bush largely justified the “war on terror” in ideological terms: as a struggle against a new totalitarian foe that had “hijacked” Islam. In this depiction, ordinary Muslims living in places like Afghanistan and Iraq were not the equivalent of Nazis or communists; they were the equivalent of the people who those previous totalitarian foes had held in bondage. Civilizational conservatives considered Bush naïve. Franklin Graham, who delivered the prayer at Bush’s first inauguration, repeatedly described Islam itself as wicked. But while their justifications for the “war on terror” differed, both ideological and civilizational conservatives backed Bush’s military adventures in Afghanistan and Iraq.

Bush left behind a GOP establishment dominated by ideological conservatives. In 2008 and 2012, McCain and Romney both resisted describing Islam itself as a threat. Romney described authoritarian Russia as America’s greatest geopolitical foe. But during both election cycles, more populist, civilizationally-oriented, conservatives—Michelle Bachmann, Herman Cain, Sarah Palin, Mike Huckabee, Ben Carson—kept attacking Islam itself.  

When he ran for president, Trump realized that on Islam, as on trade, Republican elites were out of step with the Republican base. Trump distinguished himself from his rivals not by proposing a different strategy against ISIS. He distinguished himself by suggesting that the problem was not merely ISIS, or even “radical Islam,” but Muslims in general. Republican leaders reacted to Trump’s call for banning Muslim immigration to the U.S. with revulsion. But, according to surveys, more than seven in 10 GOP voters supported it.

Trump also broke with his establishment rivals by taking a softer line on Russia. Maybe financial interests motivated him. Maybe he just likes authoritarian tough-guys. Whatever the reason, the deviation seemed politically dangerous given the overwhelming hostility to Putin among GOP foreign-policy elites. But Trump’s pro-Putin line hasn’t hurt him. In fact, Republicans as a whole have grown markedly less anti-Russian since 2014.

Partly, they’re aping Trump. But there’s something deeper at work. Ideological conservatives loathe Putin because he represents an authoritarian challenge to the American-backed order in Europe and the Middle East. But many civilizational conservatives, who once opposed the Soviet Union because of its atheism, now view Putin’s Russia as Christianity’s front line against the new civilizational enemy: Islam. Among the alt-right, Putin is a very popular man. He’s popular because he resists the liberal, cosmopolitan values that Muslims supposedly exploit to undermine the West. Richard Spencer, who was until recently married to a pro-Putin Russian writer, has called Russia the “sole white power in the world.” Matthew Heimbach, another prominent figure in the alt-right, recently told Business Insider that “Russia is the leader of the free world.” In 2013, Pat Buchanan penned a column entitled, “Is Vladimir Putin a paleoconservative? In the culture war for mankind’s future, is he one of us?”

Trump is building on this shift to recast GOP foreign policy. He’s moving it away from an ideological confrontation with authoritarian Russia and toward a civilizational conflict with Islam. Trump’s choice for National Security Advisor, General Michael Flynn, has tweeted that “fear of Muslims is rational” and that Islam is “like cancer” When asked in August about Putin, he explained that America “beat Hitler because of our relationship with the Russians” and we should renew that partnership in the new world war against “radical Islamism.” Trump’s chief strategist, Steve Bannon, likes to talk about the “long history of the Judeo-Christian West struggle against Islam … a war of immense proportions” that continues to this day. And in that struggle, he’s argued, “we the Judeo-Christian West really have to look at what he’s [Putin] talking about as far as traditionalism goes—particularly the sense of where it supports the underpinnings of nationalism.” Unlike the globalists of the European Union, Bannon argues, Putin believes in “sovereignty,” which makes him a valuable ally in America’s civilizational fight.

This is the backdrop to the looming conflict between Donald Trump and congressional Republicans like John McCain and Lindsey Graham who want to investigate Russia’s efforts to elect him. Will the GOP define Americanism as the defense of a set of universal principles or as the defense of a racial and religious heritage? The answer won’t only help determine how well liberal democracy fares overseas. It will help determine how well it fares at home.