Houston: A gunmen pulled out a shotgun and opened fire on worshippers at a church during Sunday service in Texas, killing two persons before being fatally shot by an armed member of the congregation, the authorities said.
The shooting took place at about 11:50 am (local time), during the morning service on Sunday.
The service was being live-streamed on social media.
According to the authorities, the gunman pulled out a shotgun at the West Freeway Church of Christ in White Settlement, a suburb of Fort Worth, and begun firing.
The two churchgoers who were shot, died later in a hospital, police said.
Video footage showed the gunman stand up and speak to a man nearby, who gestured at another parishioner.
The gunman then fired at the man he gestured toward.
The gunman fired again, at the man he had spoken to, before a member of the congregation acting as a security guard returned fire with a shotgun, immediately felling the attacker.
Several other parishioners also produced handguns and trained them on the attacker.
Their actions, described as "heroic" by the Texas Department of Public Safety, brought a quick end to the attack that remained under investigation on Sunday night.
The authorities have not provided information about a possible motive.
"This team responded quickly and within six seconds, the shooting was over. Two of the parishioners who were volunteers of the security force drew their weapons and took out the killer immediately, saving untold number of lives," said Texas Lt. Gov. Dan Patrick.
The security team at the church is made up of volunteers from the church's membership who are licensed to carry firearms.
"They saved a lot of lives today because this thing would have been a massacre otherwise," witnesses said.
Texas Governor Greg Abbott called the shooting "an evil act of violence".
"Places of worship are meant to be sacred, and I am grateful for the church members who acted quickly to take down the shooter and help prevent further loss of life," he said in a statement.
The shooting comes more than two years after a gunman opened fire at a church in Sutherland Springs -- a community about 300 miles away from White Settlement -- killing at least 26 people.
In September, a new law came into effect in Texas that allowed licensed handgun owners to carry weapons in places of worship.
The state has seen a number of deadly shootings this year.
In August, 22 people died and 24 were wounded at a Walmart store in El Paso.
The same month a gunman killed seven and wounded 20 at Odessa-Midland.