A collection of guns and rifles, displayed at a news conference in Brooklyn. (Colleen Long/Associated Press)

Three people were killed in California in yet another mass shooting. The culprit? A man who had a history of violence and was known for yelling out religious slogans. Shortly before the slayings, he publicly praised his god and guns on Facebook.

The shooter was Cedric Anderson; he was 53 and a former Christian pastor. On April 10 in San Bernardino, Calif., he killed his estranged wife, an 8-year-old child and then himself. He also injured another child.

Anderson had a history of violence against women: As recently as 2013 he was arrested for assault and a weapons offense. Days before the shooting, he posted on Facebook complaining that people “are not free in Christ,” and concluded, “I just pray for the[m] and keep my guns close!”

Despite his history of violence and religious fanaticism, you probably didn’t know Anderson was a Christian or a criminal. In fact, you might have thought I was speaking of Kori Ali Muhammad (whose previous name was Cory Taylor) who has been accused of killing three people in California; this time in Fresno.

But police say that when Muhammad was arrested, he yelled “Allahu akbar,” Arabic for “God is great.”

Unlike Anderson, who reportedly was deeply religious, Muhammad reportedly did not attend any mosque, and none of the Fresno Islamic centers had heard of him. Also unlike Anderson, Muhammad was homeless (the connection between poverty and violence is well documented). But, like Anderson, Muhammad had a history of criminal violence. In fact, he was already wanted for a previous slaying.

Last week, after the San Bernardino slayings, I tweeted about how we react to such acts, how deadly domestic violence incidents are often ignored, unless they are labeled as “honor killings.”

The case against Muhammad proves my point. The response to his acts erupted in anti-Muslim hate and bigotry on social media — only because he allegedly said “Allahu akbar” to police.

Fresno police say Muhammad was motivated by racism, not religion. Still, far-right influencers are pushing the anti-Muslim narrative, and once again “Allahu akbar” began trending on Twitter with a wave of Islamophobic messages. In this respect, Muhammad appears more like the white supremacist James Harris Jackson who killed a black man last month in New York City. But while the faiths of Jackson and Anderson are treated as irrelevant, Muhammad’s supposed faith is in the spotlight. (Few, if any, anti-Muslim personalities on social media called Muhammad by his preferred alias — Black Jesus.)

The desire to blame religion detracts from the true root cause of these repeated acts of violence: toxic masculinity. Since the 2012 Sandy Hook Elementary School shooting, committed by a white male, there have been 220 other school shootings in the United States — virtually all by men. Since Sandy Hook, there have been about 1,100 mass shootings in the country; virtually every one committed by men. Of those, including the one Muhammad is accused of, Muslims have committed five.

Estimates suggest that white men and Christians make up the majority of mass shooters. And, as was the case with Anderson, a history of domestic violence is a strong indicator of future mass violence. An analysis of FBI data from 2009 to 2015 suggests that 57 percent of mass shootings included a spouse, former spouse or family member among its victims. Men in America must own and stop this public health issue.

Blaming Muslims for violence shows up over and over again. During a recent show on Fox News, Jon Scott had a message to the Muslim community: “If you don’t want to be portrayed in a negative light, maybe don’t burn people alive and set off bombs and things like that.”

Host Pete Hegseth added: “Yeah, and point out the radicalism, and say that’s not me.”

Sorry, guys. Religion is not the key motivator of domestic violence or mass violence. Blaming Islam, especially when Islam categorically condemns violence and condemns violence against women, detracts from addressing the root of the violence.

Islam did not motivate Muhammad. Christianity did not motivate Anderson. Both had a history of abusive behavior.

Mass violence — and domestic violence — will stop when men learn to control themselves.

Qasim Rashid is a women’s rights attorney, author and national spokesman for the Ahmadiyya Muslim Community USA. Follow him on Twitter at @MuslimIQ.