As police continued to search for clues Saturday into a shooting at a church outside Birmingham, Alabama, that left three dead, an elderly man who subdued the gunman is being hailed as a hero who may have prevented further bloodshed.

Three people who ranged in age from 75 to 84 died in the shooting at Saint Stephen’s Episcopal Church in Vestavia Hills, just south of Birmingham, after a man who occasionally attended services at the church pulled out a handgun during a potluck dinner, police said.

Police arrested a suspect identified as Robert Findlay Smith on Thursday. On Friday, he was charged with capital murder, according to the Jefferson County District Attorney’s office.

The Rev. Doug Carpenter, who was a St. Stephen’s pastor for three decades before he retired in 2005, said the wife of a victim and other witnesses recounted to him details of the shooting.

WHAT WE KNOW ABOUT CHURCH SHOOTING: Third victim in Alabama church shooting dies; potluck attendee ‘subdued’ suspect

A man introduced himself at the potluck only as “Mr. Smith” before he sat at a table by himself, Carpenter said, adding that he had done the same at a previous church dinner.

Carpenter said other attendees tried to speak with him, invited him to join their table and offered to fix a plate of food for him. Still, the man sat alone.

“He was kind of distant and very much a loner,” Carpenter said.

Shortly after, the man pulled out his handgun, he said.

IN SHADOW OF MASS SHOOTINGS:Lawmakers, advocates press senators at hearing for gun violence response

As the gunman opened fire, another churchgoer in his 70s charged the suspect, striking him with a chair and holding him down until law enforcement arrived, Carpenter said.

“He hit him with a folding chair, wrestling him to the ground, took the gun from him and hit him in the head with his own gun,” he said.

Capt. Shane Ware of the Vestavia Hills Police Department said Friday that church members held the suspect down until police arrived.

A police mugshot shows Smith with a black eye and cuts on his face.

“The person that subdued the suspect, in my opinion, was a hero,” Ware said Friday, adding that his actions were “extremely critical in saving lives.”

BIPARTISAN GUN DEAL:What is the ‘boyfriend loophole’ in the bipartisan gun deal announced by senators?

The victims of the shooting were an 84-year-old woman whose name has yet to be released by authorities; Walter Rainey, 84; and Sarah Yeager, 75.