Nineteen minutes before the first 911 call alerted the authorities to a mass shooting at a Walmart in El Paso, Tex., a hate-filled, anti-immigrant manifesto appeared online.

It spoke of a “Hispanic invasion of Texas.” It detailed a plan to separate America into territories by race. It warned that white people were being replaced by foreigners.

[For the latest updates, read our live briefing on the Dayton and El Paso shootings.]

The authorities were scrutinizing the 2,300-word screed on Saturday and attempting to determine whether it was written by the same man who killed 20 people and injured more than two dozen others near the Mexican border.

Police officers were interviewing the suspect, Patrick Crusius, a 21-year-old white man from Allen, Tex., a roughly 10-hour drive to the Walmart. What brought him to a crowded shopping center in El Paso is one of the many questions on the minds of investigators.