The suspect in Thursday’s Gazette shootings began stalking a former high school classmate back in 2009. The last time he would have seen her was a decade before.

This is but one of several recent mass killings motivated, in large part, by an overwhelming rage against women.

The Gazette shooter found the woman on Facebook and sent a seemingly innocent message, thanking her for being “the only person ever to say hello or be nice to me in school.”

Note the self-pity disguised as gratitude.

The woman didn’t even remember him, yet he stalked her relentlessly. She went to the police. She told them: This guy is your next mass shooter.

The Toronto mass murderer who recently killed 10 and injured 15 in a van attack identified as an “incel” — the involuntarily celibate — posting that the “rebellion has already begun.” He praised a fellow incel who killed six people in 2014 in Santa Barbara. The Parkland high school shooter also idolized the Santa Barbara killer.

“My first exposure to this kind of sexual frustration was the Unabomber case,” says retired FBI profiler James R. Fitzgerald. He was tasked with reading every single thought Ted Kaczinsky put to paper. “There was a lot of vented frustration with his lack of intimate sexual relations with a female. He was in his 50s and still a virgin.”

Dr. Park Dietz points to two fairly recent examples: The Boston Marathon bombers, two brothers who fought over the younger’s desire to be sexually active, and the shooter who killed nine parishioners in a Charleston church in 2015. In that case, he accused black men of raping “our women,” a tangential admission of sexual frustration.

These men lash out at women, but really women are an excuse for their failures, says Dietz, an M.D. who has testified or consulted on major cases from John Hinckley Jr. to Jeffrey Dahmer. “It’s easy to blame ‘the women who will go with anyone but me,’ ” he says.

Fitzgerald notes that men who identify as “incels” or harbor pronounced rage towardswomen might actually suffer from inflated self-esteem. Their disordered thought process, he says, goes along these lines: Who do these women think they are, not being interested in me?

Fitzgerald has no doubt, he says, that when investigators search the Gazette shooter’s home they will find a shrine to the woman he stalked, and possibly others.

“I wouldn’t be surprised if yesterday was some kind of anniversary for him” Fitzgerald says. “A contact with this woman, or the date the article was published.”

News reports, especially in the intermediate aftermath, will often describe a shooter who just “snapped.” This never happens. As far back as 1997, renowned security expert Gavin de Becker wrote that in every kind of violence — workplace, domestic, stalking — “there is a process as observable and predictable as water coming to a boil.”

It is also true that the bulk of mass shootings are committed by men: A recent report in the Atlantic cited a 2014 work that found 93.4 percent of mass murderers are male. A recent study by Everytown for Gun Safety found that in 54 percent of mass shootings from 2009 to 2015, domestic violence was “a driving factor.” In 42 percent of these cases, the mass shooter “exhibited at least one red flag prior to the shooting.”

In the days to come, we will surely learn more about the Gazette shooter’s motives. Fitzgerald and Dietz believe whatever the specifics, the baseline factor will be the same as it always is: A failed human being who lacks the coping skills to deal with his life as is or to improve it. Women, minorities, homophobia, religion, xenophobia — all are scapegoats for the mass shooter.

The onus remains on us to push for practical change — from the reworking of toothless state-by-state stalking laws to a societal re-evaluation of who among us is a likely threat to the responsibilities of Facebook and Twitter to report threats of violence and death.

We don’t even have a federal revenge porn law. Despite widespread public and bipartisan support, the New York State legislature just killed its revenge porn bill last week, after the Internet Association — a lobbying group for Amazon, Facebook, Google and other major corporations — pushed back against it.

Ask any woman you know. Most of us have our own stories of having been stalked or harassed, the target of misdirected rage or frustration. Now, thanks to the unholy conflagration of easy weapons and ubiquitous social media, every single American is at risk of becoming collateral damage.