Image copyright Reuters Image caption Keith Thomas Kinnunen has been identified as the shooter

A gunman who opened fire in a church in Texas, fatally shooting two people before being killed by an armed member of the congregation, has been named.

Keith Thomas Kinnunen stood up in the West Freeway Church of Christ in White Settlement on Sunday and started shooting before he was himself shot.

A motive has not been established.

Meanwhile, the man who killed the gunman has spoken out about the incident, saying that he does not consider himself a hero.

Jack Wilson, a volunteer member of the church's security team, said he fired a single headshot to take down the gunman during the service, which was attended by 240 people while being livestreamed on social media.

"I had people in front of me. I had to wait until they got out of my line of fire because I didn't want to hit any of them," he told CBS News.

"At that point, the shooter, I guess, caught out of the corner of his eye because he was walking towards the front of the church. He then kind of halfway turned toward me and that's when I took the shot."

Image caption A still from a livestream shows the gunman, in black, producing a gun, before opening fire

Local TV station NBC DFW reported that Kinnunen had a criminal record including charges of aggravated assault with a deadly weapon in 2009.

Texas Attorney General Ken Paxton said on Monday the gunman had attended the church several times in the past and may have been mentally ill, but other possible motives were being explored.

"They welcome people who are transient or homeless into their church. They welcomed this guy into their church," he said.

Media playback is unsupported on your device Media caption White Settlement police chief JP Bevering explains how the attack at the Texas church unfolded

The attorney encouraged other states to allow citizens to carry concealed weapons for self-defence.

"This is the model for the future," he added.

In September, a new law came into effect in Texas that allowed licensed handgun owners to carry weapons in places of worship.

In 2017, 26 people were killed when a gunman opened fire at a Baptist church in Sutherland Springs, Texas, during a Sunday service.

The two victims killed on Saturday were identified as Anton Wallace, 64, and Richard White, 67.