This month, the Trump presidency hit a new low in its already difficult relationship with American democratic norms. On Nov. 7, President Trump fired Attorney General Jeff Sessions, apparently because he recused himself from special counsel Robert S. Mueller III’s investigation of the Trump campaign, as the law requires. The next day, the president suspended the White House press credentials of CNN’s Jim Acosta for reporting on him critically and threatened to do the same for other journalists who do not “treat the White House with respect.” And the day after that, Trump falsely accused Democrats of voter fraud in Arizona, Florida and Georgia, where his favored candidates appeared to be losing ground as ballot counting continued in closely contested races.

As a candidate and president, Trump has tested — and in some instances broken — established norms of democratic politics. He has expressed admiration for autocrats and reacted with indifference to violations of democratic principles abroad. Yet his approval ratings among Americans, while low when compared to other presidents, seem to have scarcely budged throughout his presidency.

Do Americans value democracy enough to punish politicians who disregard democratic principles? And specifically, what fraction of the U.S. electorate is willing to prioritize democratic principles when the price of doing so is voting against their policy interests or partisan loyalties? Our research suggests the number is lower than you might think.

Here’s how we did our research

To answer this question, we conducted the following experiment. Rather than asking about support for democracy directly, we presented a representative sample of 1,692 U.S. voters, recruited through LUCID and benchmarked against the American National Election survey, with a choice between two hypothetical candidates. Each was described by experimentally assigned attributes typically seen in elections, including their experience, policy proposals and partisan affiliation.

Crucially, a randomly chosen subset of those candidates were also described as supporting measures that violated a fundamental democratic principle. These included violating civil liberties, such as prosecuting journalists who refuse to reveal sources, banning protests by far-right or left groups; encroaching on the separation of powers, such as ignoring unfavorable court rulings and governing by executive orders; and undermining fair electoral competition, such as gerrymandering or cutting the number of polling stations in areas that support the other party.

For the most part, these undemocratic proposals were modeled on practices that elected incumbents have recently used to undermine democracy around the world, as in Hungary, Turkey and Venezuela. Some of these practices, like gerrymandering and voter suppression, have shown up in the United States.

We then asked our respondents which candidate they would vote for. Based on the more than 21,000 candidate choices that our respondents made, we can answer a central question about the robustness of American democracy: Are voters willing to punish candidates who violate democratic principles when doing so requires voting against their political ideology, policy priorities or partisan loyalties?

We found a striking fragility in Americans’ willingness to defend core democratic values

Overall, candidates who proposed a policy that violated a key democratic principle lost 11 percent of voters who would have otherwise supported them.

To arrive at this figure, we compared two groups of respondents. Those in the control group were choosing between two “generic” candidates, both of whom held positions perfectly consistent with democratic principles. By contrast, one of the two candidates seen by respondents in the experimental group endorsed a measure that violates a fundamental democratic principle. All other candidate attributes, including policies and party, were randomly assigned and thus balanced across the two groups. The only systematic difference between the control and experimental groups was one candidate’s endorsement of an undemocratic position. We can therefore interpret a decline in that candidate’s vote share as the voters’ punishment for that candidate’s disregard for democratic principles.

Yes, that 11 percent might decide an election. But consider who did not abandon the undemocratic candidate. Respondents who felt strongly about policies or partisanship punished undemocratic candidates at lower rates than did those with more moderate political loyalties. These differences among voters increased when our hypothetical candidates proposed more extreme liberal and conservative policies. Polarization eroded the public’s willingness to defend democracy.

This was amplified when our respondents identified as either a Democrat or a Republican. Only a fraction of our respondents — those who identified as independents but said they leaned toward one of the two parties — were willing to vote for the “other” party in large enough numbers to defeat an undemocratic candidate of their own party. Both Democrats and Republicans used a double standard, punishing undemocratic candidates more harshly when they belonged to the “other” party. Put differently, many Americans appear to be partisans first and small-d democrats only second.

What does this mean for American democracy?

When social scientists ask respondents around the world about their attitudes toward democracy, they typically use questions such as, “Democracy may have problems but it is the best system of government; do you agree?” Americans systematically respond with some of the highest levels of support for democracy.

But our findings suggest that this conventional wisdom may rest on fragile foundations. Instead of asking about support for democracy directly, we inferred citizens’ commitment to democratic principles from how they told us they would actually vote.

What we found suggests that Americans may value democratic principles — but few will choose those over their partisan loyalties. And when voters place policy and partisanship above democratic principles, why wouldn’t politicians?

Recently, Republicans are the ones most often accused of undermining democratic principles for partisan gain. But this may be because Democrats have had few opportunities to do the same: Since 2010, Republicans have controlled most state legislatures and governorships, and few GOP politicians have objected to Trump’s incursions against democratic norms.

Yet in our experiment, respondents who identified as Democrats were just as unwilling to abandon their party’s candidates as were Republicans. And some Democrats have begun to advocate fighting fire with fire.

Such a strategy risks undermining the legitimacy of the democratic process. This month’s events indicate that the toughest tests of America’s democratic foundations under the Trump presidency may be ahead. When partisans on both sides believe they must disregard democratic principles because that’s what the other side is doing, the norms that democracies depend on — including the respect for election results — may be in danger.

Matthew Graham is a PhD candidate at Yale University.

Milan Svolik is a professor of political science at Yale University and the author of “The Politics of Authoritarian Rule” (Cambridge University Press, 2012).