David Livingstone Smith, a philosophy professor at the University of New England and the author of a book on dehumanization of whole categories of people, said Mr. Trump had emboldened Americans whose views were seen as unacceptable in everyday society not long ago.

“This has always been part of American life,” he said. “But Trump has given people permission to say what they think. And that’s crack cocaine. That’s powerful. When someone allows you to be authentic, that’s a very, very potent thing. People have come out of the shadows.”

Grant Stinchfield, a former host of NRATV, the defunct online media arm of the National Rifle Association, said his “heart aches” for the victims of El Paso, but he accused the news media and Democrats of unfairly blaming Mr. Trump for a crime committed by a “disgusting, deranged human being.”

“Evil has existed since the beginning of time,” Mr. Stinchfield said. “To blame the president or any other conservative on the actions of a deranged lunatic is insane and flat-out disgusting. The problem with liberals today is they do not want to take responsibility for anything. They will blame everyone but the shooter.”

Kris Kobach, the former secretary of state in Kansas and an immigration hard-liner who is close to Mr. Trump, said Democrats were being outrageous. “They are trying to exploit this horrific tragedy to attack the president and push an open-borders agenda and push gun control,” he said. “It’s not only incorrect, it’s improper to do this at a time when people are still grieving.”

Dark, anti-immigrant language has flavored American politics for generations. Politicians in the 1880s and 1920s rose to power by seizing on fears of Italians, Japanese, Chinese and other immigrants, stoking fears about the loss of the “American identity.”

In more recent years, those who trafficked in racist conspiracies and warned that immigrants were a threat to the safety and economic well-being of native-born Americans were largely ignored by the bipartisan establishment even as they gave voice to the views of many Americans who felt disenfranchised.