“How do we stop these people?” the president says, referring to immigrants and refugees crossing the southern U.S. border. “Shoot them,” a voice calls from the crowd. And the president chuckles.

Elsewhere, a man watches as a website he built becomes a bastion of fringe movements with violent rhetoric — a cheering section for mass shootings, where murderers are lionized as heroes.

And in Texas, a lone-wolf shooter posts an anti-immigrant screed online before opening fire at a Walmart.

Did the first two things directly lead to the third? It’s impossible to say. But social scientists say there is evidence to suggest that they’re all linked. As research into terrorism and rare types of violent crimes has become more data-driven, it’s begun to show that the people we call “lone wolves” aren’t. Like the El Paso shooter, they may be isolated in their schools or physical communities, and they don’t have networks of co-conspirators helping to plan attacks. But behind these apparent loners is a sense of community and of participating in a movement. They’ve adopted new norms. They’ve had those norms reinforced. And then they act.

The criminology and terrorism studies communities used to be focused on identifying individuals who were likely to become violent, said Amarnath Amarasingam, professor of religion at Ontario’s Queen’s University and a senior research fellow at the anti-extremism think tank Institute for Strategic Dialogue. Researchers would try and figure out a “type” of person or personality that was likely to become a terrorist or commit acts of violence. “Some of the ways we thought we could identify them were upbringing, poverty, their refugee or immigrant experience, attachment to conflicts back home,” Amarasingam said. But studies comparing these variables have largely failed to turn up any signs of a consistent profile for violent extremism.

“We’ve done some projects looking at communities out of which people travel to Syria” to fight alongside ISIS, he said. “You have all the factors the same. They’re all refugee communities. All come from conflict zones. All characterized by trauma. They’re the same ethnicity, same religion, same age group, same gender. But one person goes to law school and the other goes to Syria.”

Jessie Daniels, a professor of sociology at Hunter College who has studied white supremacists in the U.S. for decades, said her research has found essentially the same thing. There is no profile that can tell you who will pick up a gun, she told me.

But, she said, when people who feel marginalized hear violent rhetoric that tells them another group of people is to blame and deserves punishment, we know someone will.

History suggests as much. “You can go back and look in this country at statistics around lynching. When there is rhetoric in the newspaper about blacks stealing jobs from white people then there is violence that follows it.”

That applies to so-called lone wolves, too. Participation in spaces where violent rhetoric is supported and welcome fosters a sense of community. And that community can be critical to what comes next.

For instance, in 2013, researchers published an analysis of lone-actor terrorism that was based on coding of the characteristics and behaviors of 119 individual terrorists. It’s easy to look at the stats and describe these people as loners — 40 percent were unemployed at the time of their attack; 50 percent were single and had never married; 54 percent were described as angry by family members and people who knew them in real life.

But the analysis also showed that these same people were often involved in ideological communities — communities built online and offline, where future terrorists sought (and often found) support and validation for their ideas. Thirty-four percent had recently joined a movement or organization centered around their extremist ideologies. Forty-eight percent were interacting in-person with extremist activists and 35 percent were doing the same online. In 68 percent of the cases, there’s evidence the “lone wolf” was consuming literature and propaganda produced by other people that helped to shore up their beliefs.

More than half the time, someone knew about the terrorist’s plan before it was carried out. (A fact that also turns up in research on school shootings in the United States.)

There’s been very little empirical research on lone actor terrorists. But what does exist has been enough to convince some researchers that “lone wolf” is a moniker that never should have existed. The ties to communities of extremist thought and social pressure are too strong to ever say someone was truly acting alone.

And that, experts told me, is why the internet has changed the way violent extremism works. In the 1930s, the public rhetoric of someone like the racist, anti-immigrant radio star Father Coughlin could (and did) create a community of violence. In the 1970s, Daniels said, white supremacists published newsletters that fostered community for subscribers.

But the internet has created new ways for those communities to recruit and build. And it’s happening faster than it did before. Daniels began to notice this in the 1990s, when she saw white supremacists launching websites that appeared to be tributes to Martin Luther King Jr., but linked people to documents designed to undermine King’s legacy and build suspicion about the civil rights movement. Today, the same kind of “idea laundering” happens on Twitter, where extremists use trending hashtags to link their ideas to mainstream ones.

And once a person does a search on those ideas, algorithms can very quickly silo them into a reality where extremism is all they see. “If you search for ISIS or neo-Nazis, you’ll get more,” Amarasingam said. “We’ve created brand new YouTube accounts and within a day or two all your recommendations are neo nazi content, just from a couple of searches.”

Meanwhile, the internet has given us more ways to foster friendships outside our physical spaces. Amarasingam is currently studying the communities that form around gaming platforms and how those can become incubators for extremism. These spaces are important, he told me, because they’re exactly the kind of thing that fits into what we know about lone actors. A person can be a white supremacist living in some liberal bastion city. They might have few friends or close relationships physically. They look around, and feel like an oppressed minority. But online, they have friends around the world. They can feel like part of a transnational movement. And when they commit violence, Amarasingam and Daniels said, these people are often saying they did it for that movement, for that community.

“That’s the power of the online space,” Amarasingam said. “People are so obsessed with the content [of video games] that they miss the human aspect. It’s not simply about tweets and Facebook videos. They’re actually becoming friends. They’re helping each other and counseling each other. That connection is quite powerful.”