White men who have lost financial stability — or think that they soon will — find moral and emotional solace in their firearms, more so than nonwhite gun owners or those on sound economic footing, according to a new study from Baylor University.

The study, published in the journal Social Problems, used a “gun empowerment” scale to analyze which groups of American gun owners feel an emotional attachment to their firearms and believe the weapons impart moral standing. The authors of the study, Carson Mencken and Paul Froese, found that white men, especially those enduring financial hardship, equate guns with heroism and consider stricter gun laws to be attacks on their masculinity.

Nonwhite gun owners who face or may soon face financial instability did not show the same attachment to firearms. Neither did white gun owners who expressed deep religious views. In fact, for nonwhites, economic precariousness was associated with decreased attachment to firearms.

The study lends quantitative empirical support to typically more qualitative analyses of the extremely touchy subject of gun culture.

Mencken and Froese asked 577 gun owners whether they felt that guns made them feel “safe,” “responsible,” “confident,” and “in control of my fate.” Next, they asked respondents whether guns made them feel “more valuable to my family,” “more valuable to my community,” “respected,” and “patriotic.”

They found white men who are under economic stress got a greater sense of self control and moral standing from having guns than any other demographic. The authors stressed that race, gender, or economic status alone did not explain attachment to guns: rather, this specific social context — whites who feel downwardly mobile — was the most important indicator.

Mencken and Froese’s research also falls in line with similar conclusions by anthropologist Jennifer Carlson, author of the 2015 book “Citizen Protectors,” an ethnography of Michigan residents who carried concealed guns.

She found that guns provided male residents of economically depressed post-industrial communities with a sense of purpose far greater than just the ability to defend oneself: as gun owners, these men could identify as protectors of their entire community at a time when other sources of security, like employers or the government, are perceived as inadequate.

As Carlson wrote in her introduction, “guns are used by men to navigate a sense of social precariousness.” She elaborated:

“First, the appeal of guns must be situated in a context of changing economic opportunities that have eroded men’s access to secure, stable employment. Second, the urgency of guns must be understood in terms of abiding fears and anxieties surrounding crime and police inefficacy, concerns that encourage men to embrace their duties as protectors. Third and finally, the celebration of guns must be understood as a response to growing feelings of alienation and social isolation, such that guns come to represent not simply an individual’s right to self-defense but also a civic duty to protect one’s family and community.”

Outsiders to the firearms world are often castigated as condescending elitists when they make similar observations about gun owners’ motivations and emotional states. Consider the fallout from Barack Obama’s infamous comment to wealthy liberals at a 2008 San Francisco fundraiser that gun owners “cling to guns” out of bitter resentment that the world is leaving them behind. The remarks were reappropriated by ideologically driven conservative gun owners who sometimes identify with the epithet “bitter clinger.”

The moment was one of Obama’s biggest campaign gaffes, playing right into the National Rifle Association’s narrative that its constituents are misunderstood and looked down upon by elites. Yet as the authors of this study found, Obama, the well-off, liberal, city-dwelling law professor, may have been on to something.