Speaking on the shooting that occurred in Sunderland, Texas, on Sunday President Donald Trump took the position that the gunman’s actions were not caused by the gun itself, but by mental illness.

“I think that mental health is your problem here,” Trump said during a press conference in Tokyo. “This was a very — based on preliminary reports — a very deranged individual. A lot of problems over a long period of time.”

The shooter Devin Kelley, 26, reportedly had a violent history. He was discharged from the airforce over bad behavior resulting from beating his wife and child. He has apparently also been something of a militant atheist consistently posting anti-Christian propaganda on social media.

Kelley reportedly threatened his mother-in-law with shooting up her church for undisclosed reasons. On Sunday, he had done just that, resulting in 26 dead.

Kelley’s spree ended after two armed bystanders gave chase, winding up with Kelly losing control of his vehicle. Police say Kelley died from a self-inflicted gunshot wound.

“Fortunately, somebody else had a gun that was shooting in the opposite direction,” Trump said. “Otherwise, it wouldn’t have been as bad as it was, it would have been much worse.”