EL PASO, Texas — The shooting that killed 20 people at a crowded El Paso shopping area will be handled as a domestic terrorism case, federal authorities said Sunday as they weighed hate-crime charges against the gunman that could carry the death penalty.

A local prosecutor announced that he would bring capital murder charges against the suspect, saying the assailant “lost the right to be among us.”

The attack on Saturday morning was followed less than a day later by another shooting that claimed nine lives in a nightlife district of Dayton, Ohio. That shooter was killed by police.

Investigators were focusing on whether the El Paso attack was a hate crime after the emergence of a racist, anti-immigrant screed that was posted online shortly beforehand. Detectives sought to determine if it was written by the man who was arrested. The border city has figured prominently in the immigration debate and is home to 680,000 people, most of them Latino.

Using a rifle, the El Paso gunman opened fire in an area packed with as many as 3,000 people during the busy back-to-school shopping season. More than two dozen people were wounded, some with life-threatening injuries, police said.

Federal officials were treating the attack as a domestic terrorism case, according to the U.S. attorney.

The Justice Department was weighing federal hate-crime charges that would carry the death penalty, according to a person familiar with the department’s decision-making process. The person was not authorized to speak on the record and spoke on condition of anonymity to The Associated Press.

Despite initial reports of possible multiple gunmen, the man in custody was believed to be the only shooter, police said.

Two law enforcement officials who spoke to The Associated Press on condition of anonymity identified him as 21-year-old Patrick Crusius. Authorities did not release his name at a news conference but said he was arrested without police firing any shots. He is from Allen, which is a nearly 10-hour drive from El Paso.

There was no immediate indication that he had an attorney.

Police say more than two dozen people were wounded in the attack at a shopping area about 5 miles (8 kilometers) from the main border checkpoint with Ciudad Juárez, Mexico. Many of the victims were shot at a Walmart.

“The scene was a horrific one,” El Paso Police Chief Greg Allen said, adding that many of the 26 people who were hurt had life-threatening injuries.

The shooting came less than a week after a 19-year-old gunman killed three people and injured 13 others at the popular Gilroy Garlic Festival in California before dying of a self-inflicted gunshot wound.

Adriana Quezada said she was in the women’s clothing section of the Walmart with her two children when she heard gunfire.

“But I thought they were hits, like roof construction,” Quezada, 39, said of the shots.

Her 19-year-old daughter and 16-year-old son threw themselves to the ground, then ran out of the store through an emergency exit. They were not hurt, Quezada said.

Relatives said a 25-year-old woman who was shot while apparently trying to shield her 2-month-old son was among those killed, while Mexican officials said three Mexican nationals were among the dead and six more were wounded.

Residents quickly volunteered to give blood to the wounded. President Donald Trump tweeted: “God be with you all!”

Democratic presidential candidate and former Texas congressman Beto O’Rourke, who is from El Paso and was at a candidate forum Saturday in Las Vegas, appeared shaken after receiving news of the shooting in his hometown.

He said he heard early reports that the shooter might have had a military-style weapon, saying we need to “keep that (expletive) on the battlefield. Do not bring it into our communities.”

In the document that was posted online shortly before the shooting, the writer expressed concern that an influx of Hispanics into the United States will replace aging white voters, potentially turning Texas blue in elections and swinging the White House to the Democrats.

The writer was also critical of Republicans for what he 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.”

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 screed with a conspiracy theory about nonwhite migrants replacing whites.

El Paso Mayor Dee Margo said he knew the shooter was not from the city.

“It’s not what we’re about,” the mayor said at the news conference with Gov. Greg Abbott and the police chief.

In the hours after the shooting, authorities blocked streets near a home in Allen associated with the suspect. Officers appeared to speak briefly with a woman who answered the door of the gray stone house and later entered the residence.

El Paso County is more than 80% Latino, according to the latest census data. Tens of thousands of Mexicans legally cross the border each day to work and shop in the city.

Trump visited in February to argue that walling off the southern border would make the U.S. safer, while city residents and O’Rourke led thousands on a protest march past the barrier of barbed wire-topped fencing and towering metal slats.

O’Rourke stressed that border walls have not made his hometown safer. The city’s murder rate was less than half the national average in 2005, the year before the start of its border fence. Before the wall project started, El Paso had been rated one of the three safest major U.S. cities going back to 1997.

Heidi Beirich, director of the Southern Poverty Law Center’s Intelligence Project, said the El Paso suspect was not on her group’s radar. “We had nothing in our files on him,” Beirich wrote in an email.

The shooting was the 21st mass killing in the United States in 2019, and the fifth public mass shooting. Before Saturday, 96 people had died in mass killings in 2019 — 26 of them in public mass shootings.

The AP/USA Today/Northeastern University mass murder database tracks all U.S. homicides since 2006 involving four or more people killed, not including the offender, over a short period of time regardless of weapon, location, victim-offender relationship or motive. The database shows that the median age of a public mass shooter is 28, significantly lower than the median age of a person who commits a mass shooting of his family.

Since 2006, 11 mass shootings — not including Saturday’s — have been committed by men who are 21 or younger.

Balsamo reported from Orlando, Florida, and Heidgerd from Dallas. Associated Press writers Martha Irvine in Chicago; Eric Tucker and Michael Biesecker in Washington, D.C.; Michael Kunzelman in Silver Spring, Maryland; Michelle L. Price in Las Vegas; Jeff Karoub in Detroit; and Jake Bleiberg in Allen, Texas, contributed. AP data editor Meghan Hoyer also reported from Washington, D.C.