If you are looking for evidence of the deep antipathy that exists in the Republican Party toward politicians, consider that the three candidates leading the race for the Republican presidential nomination — Donald Trump, Ben Carson and Carly Fiorina — have zero years of governing experience among them.

In fact, for many Republican voters, governing experience appears to be downright disqualifying, even if you are highly accomplished, even if you have been a governor who is not complicit in any of the failures and dysfunction of Washington. According to a recent ABC News/Washington Post poll, Republicans prefer an outsider to a candidate with experience in the political system by a 24-point margin (60 to 36). People who would never board an airplane piloted by a person who has never flown before, or even used a flight simulator, apparently want to elect as president someone who has never served in public office.

A phenomenon like this doesn’t arise ex nihilo; an ethos creates political openings that candidates, especially skillful manipulators of public opinion, can seize on. What’s happening right now is a reflection of the state of mind of Republican voters and bears close inspection, since it is shaping the narrative of the campaign.

This climate can’t be understood apart from the aftershock of President Obama’s winning re-election. Republicans could rationalize his victory in 2008. Mr. Obama was something of a blank slate, he presented himself as a nonideological, unifying figure, and the financial crisis, which heightened in the months before the election, virtually ensured his triumph. That year, the stars aligned in just the right way for Democrats.

But by 2012, President Obama was viewed by Republicans as a complete failure whose repudiation was inevitable. The fact that he easily won re-election, with 332 electoral votes to Mitt Romney’s 206, was a huge psychological blow to Republicans, much like the one Democrats experienced in 1984, when Ronald Reagan — despised by many liberals — won re-election in a landslide.

The way this has worked itself out is in rage directed at Republican lawmakers. Many on the right refuse to recognize the institutional constraints that prevent lawmakers from doing what they want them to do, which is use their majority status in Congress to reverse the early achievements of the Obama presidency. One telling example: Advocates for the 2013 government shutdown insisted that doing so could fully defund the Affordable Care Act, when in fact no such thing was possible. Obamacare’s subsidies are an entitlement whose spending levels are not set by the annual appropriations process, meaning a shutdown could not unilaterally defund or eliminate it. No matter; with Republicans in control of the House and Senate, the Obama agenda was expected to be undone root and branch. The fact that it could not be undone created fury. As one friend recently wrote to me, with reference to Mr. Trump, “We are frustrated by the impotency of Republicans we have elected. Maybe this loudmouth boor can actually accomplish something.”

Many grass-roots Republicans feel abandoned by and alienated from the Republican leadership — a September Fox News poll shows 60 percent of Republicans feel betrayed by politicians from their own party — and Mr. Trump, Mr. Carson and Mrs. Fiorina have been the means by which they express their unhappiness. Since elected politicians have failed so miserably, why not look to outsiders to shake things up?

But anger is not the only emotion coursing through Republican veins. There is also a widespread sense of doom. Republicans have spoken openly about feeling alienated from America, in part because of changing demographic trends. Rush Limbaugh, on the day after Mr. Obama’s re-election, admitted, “I went to bed last night thinking we’re outnumbered. I went to bed last night thinking all this discussion we’d had about this election being the election that will tell us whether or not we’ve lost the country — I went to bed last night thinking we’ve lost the country. I don’t know how else you look at this.”

Mr. Trump in particular gives voice to this feeling, declaring that “the American dream is dead” and that “our country is going to hell.” Ronald Reagan’s evocation of a shining city on a hill has been replaced by Mr. Trump’s decrepit castle on the rocks. Mr. Carson, for his part, recently declared Muslims unfit to be president. On several occasions he has compared the United States to Nazi Germany, the kind of thing one used to hear from the left.

More than at any point in recent times, then, the Republican Party — large parts of it, at least — is moving in the direction of insularity, defensiveness and discomfort with people of different ethnic and cultural backgrounds. Many on the right now see things as a pitched battle between “us” and “the other.”

All of this presents a serious threat to the Republican Party. A party that is already at a disadvantage in presidential elections is on course to alienate huge numbers of nonwhite voters, including some of the fastest-rising demographic groups in America. Four years ago, Republican presidential candidates were talking about self-deportation and electrified fences; today the front-runner is talking about forced deportation, ending birthright citizenship and calling for a “pause” on green cards issued to foreign workers. The year 2012 was hardly a model when it came to appealing to nontraditional Republican voters, but this is a giant step in the wrong direction.

One way to correct this is by putting forward public policies that channel this anger toward constructive ends; that champions a conservative agenda to reform and modernize government in ways that better people’s everyday lives. There is no shortage of areas to focus on — our tax code and regulatory regime, our health care and entitlement systems, our schools and policies on energy and immigration, all of which are badly out of touch with the needs of our time. But temper of mind and disposition, the orientation of heart and spirit matter as well.

The struggle within the Republican Party right now centers on those who, figuratively speaking, want to rebuild the village and those who want to burn it down, those who want to fight irresistible demographic changes and those who want to responsibly embrace them, those who think they can win over new Americans and those who want to turn them away. There are a number of Republican presidential candidates — senators, governors and former governors — who, if given the chance, can make the Republican Party the party of aspiration instead of resentment, the party for this era instead of one seeking to reclaim a lost era.

In his autobiography, the Scottish novelist and former member of Parliament John Buchan wrote that he was “brought up in times when one was not ashamed to be happy, and I have never learned the art of discontent.” He added, “It seems to me that those who loudly proclaim their disenchantment with life have never been really enchanted by it.” Republican voters would be wise to choose leaders who embody enchantment rather than the art of discontent, who have known the uplands and can lead the rest of us there.

Peter Wehner is a senior fellow at the Ethics and Public Policy Center and a contributing opinion writer for the New York Times.