Over the last few years, Greater Good—along with many, many other media outlets—has reported frequently on new research suggesting that people of higher socioeconomic status are less generous, less compassionate, and less empathic than others.

Now, a new study says: Not necessarily.

Actually, the new findings suggest, higher-income people are less generous only when they live in a place that has high levels of inequality between rich and poor. When the gap between the rich and poor is low, the rich might actually be more generous.

The study, published online in the prestigious Proceedings of the National Academy of Sciences, first looked at data from a national survey of about 1,500 United States residents that asked about their household income and home state, among other details. The survey also used a technique that prior research has found effective at measuring generosity: It told respondents that they’d won 10 raffle tickets, then gave them the chance to donate any number of these tickets to another survey respondent who didn’t get any tickets (and whom they’d never meet).

They found that in states with high inequality, higher-income people were less generous than people who had lower incomes. However, in states with low inequality, the opposite was true: People with higher incomes were more generous with their raffle tickets. In states where inequality was neither especially high nor low, residents’ income was unrelated to their levels of generosity.

The results raise several questions about what causes what: Is the stinginess of the rich actually responsible for the inequities in states with high inequality? Is it possible that generous people who make a lot of money prefer to live in states with low inequality because that arrangement is consistent with their values? Or is there something about living in an environment of high inequality that makes rich people less generous?

To address these questions, the researchers ran an experiment in which they manipulated people’s perceptions of inequality in their state. They recruited more than 700 people from across the United States and showed them (fabricated) data about the level of inequality in their state: Some people saw data indicating that their state had especially low inequality, while others saw data indicating that their state had especially high inequality. Then, as in the other study, the researchers told them they’d won 10 raffle tickets (for a $500 prize) and gave them the chance to donate some of those tickets to a stranger.

The results show that when higher-income people thought they lived in a state with high inequality, they were less generous. But when they were led to believe that their state had low inequality, they were no more or less generous than other people.

This echoes findings from prior studies suggesting that while rich people might sometimes act less altruistic, they aren’t inherently selfish: When well-off people in those studies were made to feel like they were of lower status, they actually became more generous, and when less well-off people were made to feel like they had higher status, they became more stingy. That suggests there might be something about the experience of elevated power and status that reduces our willingness to give to others.

So what is it about the experience of living amidst high inequality that might make rich people less generous?

According to the authors, one answer might involve a sense of entitlement—“the belief that one is more important and deserving than others”—that high-income people feel when their state’s income is more concentrated in their hands. Those feelings of entitlement and deservingness, they speculate, might help high-income people justify their extreme good fortune to themselves—and may, in turn, reduce their generosity because “people who believe they are more important than others also believe that resources rightfully belong to them.”

The authors also speculate that high inequality might lead higher-income people to worry more about losing their elevated status and thus hoard their money, because they have further to fall in a highly unequal area.

In light of these new findings, Robb Willer, one of the study’s authors and a professor of sociology at Stanford University, offers an explanation for why previous studies found that high socioeconomic status reduces generosity: Many of those earlier studies were conducted in California, a state with some of the highest inequality in the country. (The state ranked seventh in inequality, just behind Florida and Louisiana; Washington, DC, had the highest inequality in the country.) Willer says that his team’s findings don’t contradict the prior research as much as offer a caveat to it. What’s more, he says, they provide more targeted prescriptions for public policy.

“If you’re concerned about the relationship between income and generosity,” he says, “one way to counteract that is to adopt policies that promote equality.”