It’s a pretty well-known trope at this point: People who rely on government assistance programs are often the ones who oppose welfare most vociferously. Aside from the infamous “keep your government hands off my Medicare” line, examples abound of poor people who hate government assistance for poor people.

A new study explores a surprising psychological motivation that might be underpinning this opposition to welfare, at least among white people: racial resentment.

Here’s how it works, according to a paper published in the journal Social Forces: When whites feel their status in the racial hierarchy is threatened, they become more resentful of minorities. That, in turn, translates to a greater opposition toward welfare, because some people think welfare disproportionately benefits minorities. This dynamic, the authors find, might be why opposition to welfare programs increased after 2008—when the economy was in tatters and the nation had elected a black president.

For the study, the authors—Rachel Wetts of UC Berkeley and Robb Willer of Stanford University—first analyzed survey data and found that “whites’ racial resentment rose beginning in 2008 and continued rising in 2012.” They note that though whites still had higher incomes, wealth, and representation in government than African Americans and Latinos during that time, “much public discourse about race in this period emphasized America’s increasing demographic diversity and the declining dominance of white Americans.” Some American whites, it seems, felt threatened by this.

Starting in 2008, the study authors found, minorities showed more positive attitudes toward welfare, while whites’ attitudes held steady—even though recessions tend to increase support for government programs. That racial gap in support for welfare among the races persisted in 2012, even though all Americans began to oppose welfare in greater numbers at that time.

Willer and Wetts later did a series of experiments meant to test whether these two trends were related. First, they found that when white participants were told that whites continue to be the “largest single ethnic group in the United States,” they proposed cutting $28 million from federal welfare spending. Those told that whites’ population share is “substantially declining” proposed cutting $51 million. The white participants who were told their population share was declining were also more opposed to welfare and had higher levels of racial resentment—and the latter phenomenon helped explain the former, according to the authors.

Then, they found whites were less likely to support programs that benefited minorities if they had been told that the gap between white and minority incomes is closing. What’s more, white participants who opposed a welfare program benefiting minorities went on to support a program benefiting whites.

There are a few caveats to keep in mind here. Not all the researchers’ tests yielded significant links between threats, welfare opposition, and racial resentment, so they would have to be repeated in order to prove the trends hold up more broadly. And priming, an experimental method that reminds people of something (say, whites’ share of the population) before testing their attitudes, has been criticized as not very reliable.

The priming-style measures used in this study could be important, though, because what Americans see in the news influences their support for different types of candidates and policies. “Because public attitudes partially drive developments in anti-poverty policy, these findings suggest that perceptions of rising minority power, declines in whites’ relative socioeconomic status, or other perceived macro-level threats to whites’ racial status may provoke adoption of more restrictive welfare regimes,” the authors write.

And status threat, in general, is a very powerful motivator. Earlier, Willer, the author of this study, found that threats to the status of whites increased support for the Tea Party. Studies of white supremacists have found they feel whites are discriminated against. A study a few months ago found that feeling America’s status is threatened motivated support for President Trump.

Taken together, the racially driven opposition to welfare could be one reason why Trump has tried to cut various government programs. “The Trump administration has begun allowing states to impose work requirements on Medicaid recipients, and has proposed tripling the rents for the poorest households receiving federal housing assistance,” The Washington Post’s Caitlin Dewey points out. “The House is also scheduled to vote again next month on a plan to cut $9 billion from food-stamp benefits over 10 years and require most adults to hold a job to receive payments.”

The takeaway from this study is a depressing one: “This further implies that evidence of increased racial equality could exacerbate overall economic inequality,” the authors note. “As whites attempt to undermine racial progress they see as threatening their group’s status, they increase opposition to programs intended to benefit poorer members of all racial groups.”

A rising tide could lift all boats, in other words. But some people will still want their boats to be just a little higher than the others.