San Diego authorities are praising the courage of a 51-year-old man they say went after the suspected shooter at a synagogue over the weekend.
Local resident Oscar Stewart "rushed" at the alleged gunman inside the synagogue and chased after the suspect as he fled to a parked vehicle nearby, according to the San Diego County Sheriff's Department. Stewart caught up to the suspect as he got into the car and was about to drive away.
An off-duty U.S. Border Patrol agent, who is a member of the synagogue, also ran out and yelled for Stewart to stand back from the vehicle, allowing him to fire his weapon, per officials. The agent shot at the suspect's car as he drove off.
"Mr. Stewart risked his life to stop the shooter and saved lives in the process," the sheriff's department said in a statement Sunday.
The suspect, identified as a 19-year-old man, was taken into custody moments later when a police canine officer on the way to the scene spotted him. The suspect jumped out of his car and put his hands up, according to San Diego Police Chief David Nisleit.
The suspect was charged with one count of first-degree murder and three counts of attempted first-degree murder. He is scheduled to appear in a San Diego court Wednesday.
A federal source with direct knowledge of the investigation told ABC News the suspect purchased the semi-automatic rifle in San Diego on Friday, the day before the shooting.
Stewart, who lives in the Rancho Bernardo community in the northern hills of San Diego, said he normally sits in the front of the synagogue but decided to sit in the back on this particular day.
“For some reason, I just got up before the Torah reading," he told ABC San Diego affiliate KGTV. "I just got up and I went to the back for no particular reason."
When he heard the first gunshots, Stewart said he ran toward the shooter and yelled at him. Stewart said the gunman looked at him before running out of the building.
“When I shouted, they said that it sounded like four men shouting," he told KGTV. "I don’t know if that was me or if that was an angel, if you believe in angels, or what made that noise.”
Stewart said the Border Patrol agent also chased after the suspect and tried to immobilize his vehicle by shooting at the wheels.
“When I came back into the building, I saw the rabbi, he was bleeding from his hands," Stewart told KGTV. "I immediately went to the lady on the floor and started doing CPR on her. She didn’t make it."
ABC News' Stacy Chen, Christopher Donato, Matthew Fuhrman, Matt Gutman, Joshua Hoyos, Estie Pyper and Alex Stone contributed to this report