When Texas resident Edgar Tamayo shot and killed a police officer in 1994, he was arrested the same day, and twenty years later, the state of Texas executed him by lethal injection. His guilt wasn’t in question, but Tamayo’s death was nonetheless controversial: He was a Mexican citizen, and the Mexican government—which does not support the death penalty—appealed to the U.S. to let him live. Mexicans around the world protested his fate. Some Americans—including Secretary of State John Kerry—feared the execution could even threaten the U.S.’s relationship with Mexico or endanger Americans living abroad.

There are currently 60 Mexican nationals on death row in the U.S. (ten of them in Texas), and, as of April, a total of 138 foreign nationals awaiting execution in the U.S. The execution of foreign nationals inevitably generates more controversy than most death penalty cases, and now we have another reason to question the treatment of foreign criminals: A new study has found that U.S. juries may show less mercy to non-citizens. In a new paper, forthcoming in the journal American Sociological Review, a team of researchers led by Michael Light, a sociologist at Purdue University, analyzed 17 years’ worth of data from the U.S. federal district courts, from 1992 to 2008. Most research on juries’ biases has focused on variables like race, ethnicity and gender—scientists have found that black and Hispanic defendants tend to get harsher sentences than whites—but citizenship has been largely neglected.

After controlling for factors like age, race, education level, criminal history, and seriousness of the crime, Light and his colleagues found that non-U.S. citizens received sentences that were, on average, two to four months longer than those doled out to American citizens. And they were more likely to get prison sentences in the first place: In 2008, for instance, 96 percent of convicted non-citizens were given at least some jail time, compared to 85 percent of citizens. Undocumented immigrants fared even worse than non-citizens residing in the U.S. legally.

It’s not just jurors’ preference for their own groups that explains the penalty for non-citizens: It may reflect a (presumably unconscious) effort to maintain dominance in light of an influx of immigrants. “The group threat perspective … suggests dominant group members feel threatened economically, politically, criminally, or culturally," the authors write, "and will step up efforts to maintain social control when minority group populations are increasing.”