The man killed in the Laguna Woods church shooting Sunday was a doctor who had tackled the gunman before being shot, officials said.

The shooting, which is being investigated as a hate crime, happened during a lunch banquet after a morning service at Geneva Presbyterian Church on the 24000 block of El Toro Road.

Before opening fire, the gunman secured the church’s doors with chains and tried to disable locks with superglue, Orange County Sheriff Don Barnes said.

The suspect then opened fire inside the church, where about 50 people were gathered.

One churchgoer, 52-year-old Dr. John Cheng, charged at the gunman, tackled him and tried to disarm him, according to the sheriff.

This allowed other parishioners to intercede, subdue the attacker and save lives, Barnes said.

During the struggle, a pastor threw a chair at the suspect and the churchgoers hogtied him with an extension cord until deputies were able to force entry into the church and take him into custody, authorities said.

Cheng was shot and killed while tackling the gunman.

“He took it upon himself to charge across the room and to do everything he could to disable the assailant… He sacrificed himself so that others could live,” O.C. District Attorney Todd Spitzer said.

The sheriff said there would have been many more victims if it weren’t for Cheng’s actions.

“Dr. Cheng is a hero,” the sheriff said.

Cheng leaves behind a wife and two children.

“He’s a beloved member of his community is known for his hard work and work ethic and sports medicine,” Barnes said. “Our thoughts and prayers go out to him, his friends in the community for their loss, as well as the Geneva Presbyterian Church.”

The suspect in the shooting was identified as Las Vegas resident, 68-year-old David Chou, who authorities say was targeting the Taiwanese community.