EL PASO, Texas — Twenty-one people were killed and more than two dozen were injured Saturday after a gunman opened fire at a Walmart in El Paso, Texas. The suspect is 21-year-old Patrick Crusius of Allen, Texas. 

District Attorney Jaime Esparza said that Crusius is being held on capital murder charges, and that authorities would be seeking the death penalty. 

RELATED: 29 dead in 13 hours: 2 mass shootings shake America

RELATED: VERIFY: False political info being shared on mass shooting suspects

El Paso police chief Greg Allen attributed a racist, anti-immigrant document posted online shortly before the shooting to Crusius. Based on the contents of the document, state and federal authorities are investigating the possibility of federal hate crime and federal firearms charges. 

U.S. Attorney John Bash also said the case was being treated as domestic terrorism. 

In the document, the writer expresses concern that an influx of Hispanics into the United States will replace aging white voters, potentially turning Texas blue in upcoming elections and swinging the White House to the Democrats.

RELATED: El Paso shooting suspect booked on capital murder charges

The document was also critical of Republicans for what was described as close ties to corporations and degradation of the environment.

Though a Twitter account that appears to belong to Crusius included pro-Trump posts praising the plan to build more border wall, the writer of the online document says his views on race predated Trump's campaign and that any attempt to blame the president for his actions was "fake news."

RELATED: Donation page created for El Paso shooting victims

Though the writer denied he was a white supremacist, the document says "race mixing" is destroying the nation and recommends dividing the United States into territorial enclaves determined by race. The first sentence of the four-page document expresses support for the man accused of killing 51 people at two New Zealand mosques in March after posting his own document with a conspiracy theory about nonwhite migrants replacing whites.