A deadly shooting at a mosque in San Diego that left three people dead is now drawing comparisons to the 2022 Buffalo mass shooting.

Former Erie County District Attorney John Flynn said the similarities between the two attacks are hard to ignore.

Authorities say two teenage gunmen allegedly targeted victims in the San Diego attack because of their religion. Investigators also said the shooting was linked to online extremist content.

Flynn, who prosecuted the state case against Payton Gendron in the Buffalo supermarket massacre, said the alleged San Diego attackers followed a disturbingly familiar pattern.

RELATED: Court provides update on jury selection process for Gendron death penalty trial

According to Flynn, the San Diego suspects were allegedly radicalized online, created a manifesto, and livestreamed the attack.

“Both Gendron and these kids in, in San Diego, they had a manifesto,” Flynn said. “And they referenced prominently in their manifesto of Brenton Tarrant, who was a mass shooter in New Zealand back in 2019.”

Flynn added that the similarities in how the suspects allegedly idolized Tarrant were particularly striking.

“Their fascination with Tarrant is extremely similar,” Flynn said. “Peyton Gendron actually had the last name ‘Tarrant’ engraved … on his weapon.”

Flynn said social media continues to play a major role in spreading extremist ideologies, particularly among young people, and remains a key factor in how such attacks are influenced and carried out.

Some 1,274 Western New Yorkers have now been identified as qualified potential jurors for the federal death penalty trial of Payton Gendron.

Gendron is already serving a life sentence after admitting to state charges that he carried out the racist mass shooting at the Tops Market on Jefferson Avenue on May 14, 2022, in which 10 Black people were killed.