Supporters cheer President Trump as he speaks during an April “Make America Great Again” rally in Washington, Mich. (Joshua Roberts/Reuters)

President Trump’s election upended the conventional view of U.S. class politics. Republicans have long been considered the party of the affluent and upwardly mobile, while Democrats have appealed to the economically disadvantaged. But many observers have suggested that Trump “tapped into the anger of a declining middle class” rooted in decades of income stagnation and growing social distress.

Even those who acknowledged the fact that Trump voters “had, on average, higher incomes” than Hillary Clinton voters argued that “the trajectory of their communities felt far worse.” The evidence for this interpretation consists mostly of county-level correlations between economic and social characteristics and voting behavior.

We looked at the political impact of long-term shifts in economic fortunes more directly, using a unique panel study tracking the same people over more than three decades, from 1965 through 1997.

Obviously, given that timing, our analysis cannot speak specifically to Trump voters. But it does give a surprisingly clear picture of how economic mobility influenced political attitudes in the late 20th century, including the era of “stagflation” from 1973 to 1982, an era of economic disruption, recessions and slow growth much like our own.

In that era, people with greater-than-average long-term income gains became significantly more conservative — and Republican — while those whose incomes stagnated did not. That’s much more consistent with a traditional understanding of class politics than with the notion of an anti-government backlash rooted in economic grievances.

Using panel survey data from 2012 and 2016, political scientist Diana Mutz found “little to no evidence” that declines in family income or local economic indicators increased support for Trump. Indeed, places with higher median incomes became somewhat more Republican. As Mutz noted, that’s “precisely the opposite of what one would expect based on the left behind thesis.”

But Mutz’s study covered only four years. What about upward or downward economic mobility over decades or generations? For that, we looked at the Youth-Parent Socialization Panel Study conducted by political scientist Kent Jennings and his collaborators. They tracked a national sample of 935 high school graduates from the Class of 1965 over more than three decades, giving us a long-term record of changing economic fortunes and political views in real time.

Jennings’s survey respondents left high school near the end of a 25-year period of unusually rapid and egalitarian income growth. But they spent most of their working lives in an economic climate of slow growth and escalating inequality. Their income trajectories include examples of both downward and upward economic mobility. At age 50, 16 percent said they were worse off than their parents had been at the same age; 47 percent said they were better off.

How did declining economic fortunes affect political outlooks? The economic downturn of the 1970s saw a marked conservative shift in economic views and in social attitudes toward race and crime, seemingly consistent with “the left behind thesis.” One question in the Jennings survey registered an 11-point drop (on a 100-point scale) in support for government assistance to blacks and other minority groups between 1973 and 1982. Another showed a 17-point increase in support for stopping crime regardless of risks to the rights of the accused.

But whose views actually changed?

The conservative shifts were strongest among people whose own family incomes were growing. If economic malaise helped to fuel political resentment, it did so primarily among the upwardly mobile. Their attitudes also grew more conservative on a variety of economic issues, including support for big business versus labor unions and resistance to government provision of jobs and income support, even after allowing for the effects of partisan loyalties, college education, race, sex and other factors. As journalist Robert Kuttner put it at the time, the revolt against big government during hard times was a “Revolt of the Haves.”

Between 1982 and 1997, as economic inequality escalated, these conservative shifts slowed and, in some cases, reversed. But who got more liberal? Mostly, people whose family incomes grew at lower than average rates. Thus, the first 15 years of the “New Gilded Age” further widened the political gap between economic winners and losers.

Long-term economic mobility also produced substantial changes in partisanship. In the “stagflation” era from 1973 to 1982, whites with above-average income growth became 18 percent more likely to identify as Republicans — while those whose real incomes declined became only 1 percent more likely to call themselves Republican. Between 1982 and 1997, Republican gains slowed, but whites with above-average income growth became 12 percent more likely to say they were Republican, while there was no shift toward Republicans among those whose incomes grew more slowly or actually fell.

Republican gains by income growth and subjective mobility (whites only)

In 1997, Jennings asked respondents whether they were better off than their parents had been at the same age. Among whites who said yes, the Democratic partisan margin declined by 33 points between 1965 and 1997. By contrast, Republicans gained less than four points among whites who said they were worse off than their parents.

Those who felt left behind — like those who were left behind — remained steadfast Democrats, even as the Republican Party made major inroads among the upwardly mobile.

Of course, two more decades of slow growth and escalating inequality may have brewed new support for conservative “populism” among those left behind. For example, some members of the rural white working class blame particular out-groups, including public employees, immigrants, Muslims and leftist urban elites, for their own perceived loss of status.

But late-20th-century political history suggests that economic grievances are neither necessary nor sufficient to make that sort of cultural scapegoating a potent political strategy.

Larry M. Bartels is a political scientist at Vanderbilt University and the author of “Unequal Democracy: The Political Economy of the New Gilded Age, 2nd ed” (Princeton University Press, 2016).

Katherine J. Cramer is a political scientist at the University of Wisconsin at Madison and the author of “The Politics of Resentment: Rural Consciousness in Wisconsin and the Rise of Scott Walker” (University of Chicago Press, 2016).