Recently, however, a separate team of three scientists posed a question that could upend this connection between moral foundations and politics: What if it’s the other way around? What if you cared so much about loyalty and the troops because you first identified as conservative?

In a series of analyses published recently in the American Journal of Political Science, the three researchers found that people’s moral codes don’t cause or predict their political ideology; instead, people’s ideology appears to predict their answers on the moral-foundations questionnaire. As Peter Hatemi, one of the study’s authors and a political-science professor at Pennsylvania State University, puts it: “We will switch our moral compass depending on how it fits with what we believe politically.”

Hatemi and his co-authors based their analysis on existing data from more than a thousand participants in the American National Election Studies panel from 2008, as well as from a sample of hundreds of Australians originally polled between 2007 and 2011—in both cases, participants took some version of the moral-foundations questionnaire. The trio also administered the moral-foundations questionnaire and a survey about political attitudes to hundreds more Americans from Amazon’s Mechanical Turk platform.

After gathering all this data, the researchers performed statistical analyses to see if people’s moral-foundations answers would help predict, or cause, their political ideology. The answer in both cases was no: Knowing someone’s scores on the questionnaire didn’t help meaningfully predict whether they would have liberal or conservative values several months or years later. However, the reverse held up. People’s political ideology could point toward their moral-foundations answers.

Needless to say, moral and political convictions are complicated. How any one person develops his or her beliefs is always a strange alchemy of upbringing, culture, and innate predispositions. And political parties often clearly appeal to moral values to defend their positions on a huge variety of charged topics, such as abortion, immigration, and gun control. But the new study suggests these values might at least be slipperier than political parties would like to admit.

Hatemi and his team point out two somewhat recent examples of Americans’ party loyalties potentially superseding the moral views they hold. American evangelicals often say they admire morally pure actions and family values, yet in 2016 white evangelicals voted overwhelmingly for Donald Trump, a man who has reportedly had extramarital affairs and bragged about grabbing women by their genitals. Some Democrats who align themselves with the #MeToo movement support Bill Clinton, who has been accused of inappropriate sexual conduct.

Both parties also sometimes rely on similar moral arguments to make opposite cases. The value of life, for instance, has been used by both Democrats and Republicans to support (or oppose) the Affordable Care Act or the death penalty. “People tend to forgive things that are done by politicians on their own sides that they would claim is morally over the line on the other side,” says Kevin Smith, a political scientist at the University of Nebraska-Lincoln and another author of the study.