Congregants at the Keystone Fellowship Church in Montgomery Township were singing a hymn Sunday morning as gunfire erupted, fatally wounding one man and terrorizing hundreds of worshipers, including children. People dove beneath chairs in the spacious sanctuary, afraid for their lives.

The victim was Robert Braxton, 27, a member of the church, according to Montgomery County District Attorney Kevin Steele.

He said that the shooter, also a church member, fired at least one shot from a semi-automatic handgun at Braxton, striking him in the chest. Steele said the shooter, whom he would not identify, had a license to carry a concealed weapon.

He added during a news conference Sunday afternoon that investigators were trying to "determine if the shooting was justified under the law." Steele said that the shooter, who was not in custody, was not a police officer and had been cooperating with investigators.

Steele said the shooting was apparently unrelated to the presence of a missionary who had worked in Sudan, a country rife with religious persecution. He had spoken at the 9 a.m. service and was preparing to address the 11 a.m. gathering.

"Not that I'm aware of," Steele said when asked if there was a connection.

The shooting occurred at nearly the exact moment Democratic presidential candidate Hillary Clinton was decrying gun violence in remarks at Triumph Baptist Church in North Philadelphia. She was referencing the June shooting at Emanuel A.M.E. Church in Charleston, S.C., where nine people were killed.

In Montgomery Township, Steele said the shooter was injured in the altercation. That man and Braxton were both transported to Abington-Lansdale Hospital-Jefferson Health, where Braxton died less than an hour later.

Describing what little was known about the shooting, Steele said, "It was a disturbance that escalated into an altercation between two church members."

The shooting occurred in a back section of chairs arranged in the sanctuary of the nondenominational church, witnesses said. The disturbance began about 11 a.m. as the service was beginning. Gunfire rang out minutes later, and police were on the scene at 11:23 a.m.

Joel Somers, 52, of Hatfield, who heard the unnamed speaker at the earlier service, said his first thought was that someone was gunning for the missionary. He said worshipers had been told they couldn't use their cellphones to record or photograph the speaker, to protect his safety.

"I thought, 'Oh my God, they put a hit out on the missionary,' " Somers said.

Somers said that he'd been frightened because his daughter, Breeana Somers, 24, of Lansdale, and his young granddaughter were in the church during the shooting.

At the same time, Breeana was frantically trying to reach her father, erroneously believing he'd been in the church while the shooting occurred.

"My daughter called me hysterical, asking where I was," Somers said.

In an interview, Breeana Somers said that before the gunfire, she'd heard a verbal altercation between two men.

"I heard a fight, a kind of confrontation," she said. "It may have been a fistfight between two guys. One guy was acting crazy. I'm guessing he was the shooter."

Unable to see what was happening, she said she then heard three gunshots in quick succession, sounding like champagne corks popping.

"I went under a chair in a fetal position," said Breeana Somers, a student at the Temple University Beasley School of Law.

"I tried to make myself as small as possible," she said. "It's really frightening that anything like this could happen here."

She added that others in the congregation had said the shooting was part of a domestic dispute, but authorities wouldn't comment.

Earlier Sunday afternoon, the Keystone Fellowship congregation confirmed by social media that a shooting had taken place at their church and that a man was being questioned by police.

"We at Keystone are saddened to confirm that a shooting took place at our Montgomeryville campus this morning," church officials said on their Facebook page. "One man was shot and another is being questioned by police; no one else was hurt."

The posting said police and medics were called immediately to the campus at 427 Stump Rd. The street was quickly closed off between Orchard Drive and DeKalb Pike.

Later, the church posted on Facebook its plans for a public prayer service Monday at 7 p.m. at Keystone Fellowship Skippack in Schwenksville. Officials also thanked "the many police officers and first responders for their kind assistance in these very difficult circumstances."

The two-story church is set back off from the road, home to large, one-story businesses on wide lots with well-tended lawns. Nearby is the facility housing Harriet Carter Gifts Inc.

"As a church family, we are shocked and heartbroken over what took place, and our congregation is in prayer for everyone involved," the church members said.

Around 3:30 p.m., seven church members sat on the lawn in front of the church to pray, protected by police, who kept reporters away from the group.

Joel Somers said that during the 9 a.m. service, the Sudanese speaker had delivered a moving, "very sad" address about the civil wars in Sudan.

"It's a shame, he comes all this way to America and has to deal with this," Joel Somers added.

In her remarks in North Philadelphia, Clinton unknowingly added a postscript to the Montgomery County shooting, saying, "We as a people have to start showing each other more respect, more kindness, more love."