Mr. Kinnunen approached Mr. Wallace, who was administering communion, and the two men spoke briefly. “No one knows what that conversation was,” Mr. Wilson said. The gunman sat down and then went up to Mr. Wallace again, this time pulling out a shotgun he had hidden under his coat.

Mr. Wilson said that both he and Mr. White drew their guns from their holsters. Mr. Kinnunen fired at Mr. Wallace and Mr. White from close range. Mr. Wilson said he had a clear shot at the gunman’s head. “The thing I teach in our classes, in our training, is you don’t do head shots unless that’s all you have,” he said. “And that’s all I had at that point.”

He fired once. Mr. Kinnunen, bleeding heavily, appeared to be dead in less than two minutes, he said.

In the days since the attack, Mr. Kinnunen’s family and acquaintances have said he had a history of mental illness and troubles with the law.

He was married and divorced twice, and had one son, his family said.

Court records show that he was arrested in 2012 in Oklahoma, where he was accused of setting a fire in a cotton field by soaking tampons in lamp oil and lighting them. Mr. Kinnunen told a court-appointed psychologist after his arrest that he had tried to kill himself with a firearm at the age of about 19, but that he was no longer suicidal. But he attacked fellow jail inmates, according to the psychologist’s report, and went on a hunger strike, saying he thought he was being poisoned.

That same year, Cindy Glasgow-Voegle, his former wife, sought a protective order against him. In court documents, she said he had shown up with no money and no car, wanting to see their son. But the boy was terrified of his father, she said; he had a criminal record in several states, and was violent and “paranoid.”

Ms. Glasgow-Voegle said she had helped him get a job and a trailer, but he quit the job and landed in the county jail for assaulting a man. He told her he was “battling a demon.”