Having access to a gun is more of a risk factor for violence than being diagnosed with a mental illness, research shows.

That stands in stark contrast to a statement President Donald Trump made Monday in addressing the nation after this weekend’s mass shootings in Dayton, Ohio, and El Paso, Texas.

“Mental illness and hatred pull the trigger, not the gun,” Trump said.

Experts and lawmakers who are once again trying to make sense of what drives gun violence in the United States, however, disagree about what role, if any, mental illness plays.

“Mental illness diagnosis is not an evidence-based risk factor for risk of violence toward other people — 50 percent of Americans meet criteria for a mental illness at some point in their lifetime, and most will not go on to commit violent crimes,” said Beth McGinty, an associate professor of health policy and management at the Johns Hopkins Bloomberg School of Public Health.

According to the American Psychological Association, people with serious mental illness commit only about 3 percent of violent crimes.

“Routinely blaming mass shootings on mental illness is unfounded and stigmatizing,” the association's president, Rosie Phillips Davis, said in a statement Sunday in response to the shootings. “The rates of mental illness are roughly the same around the world, yet other countries are not experiencing these traumatic events as often as we face them. One critical factor is access to, and the lethality of, the weapons that are being used in these crimes. Adding racism, intolerance and bigotry to the mix is a recipe for disaster.”

Additional research published by the APA found that problems with self-esteem and perceived social rejection are common characteristics among people who commit mass shootings.

Significant trauma over a period of time is another common experience among perpetrators of mass shootings, said Dan Flannery, director of the Begun Center for Violence Prevention at Case Western University.

“If you’re going to do screening, you need to screen for multiple things, and mental health is only one of them,” Flannery told NBC News. “You need to understand what’s going on in and consider stress points — what’s happening at work, in domestic life and their social media activity. If someone belongs to a lot of hate groups on social media, that’s a red flag.”

Gun access

Other factors also play a role in everyday gun violence.

Having access to a gun, coupled with certain personality traits, is one such risk factor for gun violence — and a big one, at that.

According to a study published in April in the journal Preventive Medicine, people who have access to a gun are more than 18 times as likely to threaten someone, compared with those without gun access. And certain personality traits, including impulsivity and excessive anger — especially when a person displays outbursts of anger in public settings or at work — could make a person who has access to a gun more likely to use it in a violent crime.

The research, from the University of Texas Medical Branch, found that people who are prone to hostility were more than three times more likely to threaten someone with a gun.

The study also looked at how mental health symptoms relate to gun violence.

“The majority of mental health symptoms we examined, including anxiety, depression, stress, PTSD, and borderline personality disorder, were unrelated to gun violence,” said lead study author Yu Lu, a postdoctoral research fellow at the University of Texas Medical Branch.

A history of risky or dangerous behaviors

Substance abuse and a history of violence, especially domestic violence, are strongly associated with gun violence.

Problematic substance use, especially of alcohol, is a major risk factor that could influence whether a person will use a gun to commit a violent crime, according to a report from the Consortium for Risk-Based Firearm Policy, an organization of researchers, practitioners and advocates who develop gun violence prevention policy recommendations based on existing research.

“The best predictor of future risky or violent behavior is past behavior,” said McGinty, who was involved with the report. “Having multiple DUIs or DWIs is one way of operationalizing that type of risk.”

In fact, people who had been convicted of driving under the influence at least twice in a five-year span were more likely to commit gun violence than a person with mental illness, the report found. A history of domestic violence or violent misdemeanors is also a red flag.

“If you want to screen for factors that might indicate people who are at high risk of committing gun violence, it’s these factors that suggest risk factors for future violence, not having a mental illness,” McGinty said. “Having a mental illness is not a dangerous behavior.”

CORRECTION (Aug. 7, 10:01 a.m. ET): An earlier version of this article misstated the name of a medical trade organization that researches mental illness and violent crime. It is the American Psychological Association, not the American Psychiatric Association.

Follow NBC HEALTH on Twitter & Facebook.