In focusing on Iran and Israel, Republican candidates were articulating an outward-looking nationalism. Their basic argument, which they applied to Russia and ISIS too, was that because President Obama didn’t really believe in America, he had overseen America’s retreat from the world. As a result, America’s enemies were stronger, America’s allies were fearful, and the world had become a more chaotic, more dangerous place. The answer, GOP candidates declared, virtually in unison, was to reassert American power. By bolstering America’s sagging empire, they would make America safer and the world more stable and free.

Then along came Trump. In his announcement speech, he mentioned Israel twice, Iran seven times, Mexico 13 times and China 24 times. Trump didn’t contradict the narrative being spun by his rivals; he made his contempt for the Iran deal plain. But his focus was different. Instead of outward-looking nationalism, Trump peddled inward-looking nationalism. He, too, said that America under Obama was weak. But instead of focusing on the consequences of that weakness overseas, he focused on the consequences at home. Instead of focusing on how Iran was making the Middle East dangerous and chaotic, he focused on how illegal immigrants from Mexico were making the United States dangerous and chaotic. Instead of focusing on how Russia was undermining Ukraine, he focused on how China was stealing American jobs. The other candidates said hostile countries were undermining America’s global position. Trump focused on the way said hostile countries were undermining Americans’ quality of life.

In so doing, Trump exploited a cleavage between the Republican elite and many Republican voters. For the most part, GOP elites are nationalists when it comes to international politics but globalists when it comes to international economics. They favor a tough line on countries like Iran and Russia that pose military threats but a soft line on countries like China and Mexico that pose economic threats. That’s because those economic threats don’t apply to them. Trade with China and illegal immigration from Mexico don’t threaten their livelihoods; they enhance them.

Many ordinary GOP voters, by contrast, are nationalists on both international politics and economics. And they toggle back and forth between those priorities, depending on what’s going on in their lives and what’s in the news. In the 1980s, conservatives mostly focused on the political threat posed by the USSR. But when the Cold War ended, many drifted to Ross Perot and Pat Buchanan, who emphasized the economic threat posed by NAFTA. Similarly, last year’s ISIS beheadings turned many conservatives’ attention to the Middle East. They sparked both fear and an intense desire to defend America, and Christianity, by wiping ISIS out. Iran, because of its history of humiliating the United States, sponsoring terrorism, and threatening Israel, became part of the same nationalist cocktail.