The shooting that killed nearly two dozen 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 suspected gunman that could carry the death penalty.

The death toll rose to 22 people on Monday after two people died in hospital, El Paso police said on Twitter.

A local prosecutor announced Sunday that he would file capital murder charges, declaring the alleged assailant had "lost the right to be among us."

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

Together, the assaults wounded more than 50 people, some of them critically, and shocked a country that has grown accustomed to regular spasms of gun violence.

Investigators focused 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.

Eleven-year-old Leilani Hebben, right, embraces her mother Anabel Hebben as they visit the scene of the mass shooting in El Paso. (John Locher/The Associated Press)

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.

Federal officials were treating the attack as a domestic terrorism case, according to the U.S. Attorney for the Western District of Texas John Bash. The Justice Department was weighing federal hate-crime charges that would carry the death penalty.

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

Law enforcement officials identified him as 21-year-old Patrick Crusius, a white male from Allen, a Dallas suburb which is a nearly 10-hour drive from El Paso. He was arrested without police firing any shots, authorities said. There was no immediate indication that he had an attorney.

Distance from suspect's home near Dallas to shooting location in El Paso:

(CBC)

FBI agents have executed search warrants at three homes in the Dallas-Fort Worth area where suspected El Paso gunman Crusius had stayed.

An agency spokesperson, Melinda Urbina, declined to give more details on the locations.

One of them was the home of his grandparents in Allen, Texas, where authorities shut down streets following the shooting.

El Paso Police Chief Greg Allen said the suspect was co-operative and "forthcoming with information."

"He basically didn't hold anything back. Particular questions were asked, and he responded in the way that needed to be answered," Allen said.

People gather in Juarez, Mexico, on Saturday during a vigil for the three Mexican nationals who were killed in an El Paso shopping-complex shooting. (Christian Chavez/Associated Press)

El Paso police said they did not know where the weapon was purchased. Allen acknowledged that it is legal under Texas law to carry a long gun openly in a public place.

"Of course, normal individuals seeing that type of weapon might be alarmed," but before he began firing, the suspect was technically "within the realm of the law," Allen said.

The attack targeted a shopping area about eight kilometres from the main border checkpoint with Ciudad Juarez, Mexico. Many of the victims were shot at a Walmart.

"The scene was a horrific one," Allen said.

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.

Mother died protecting baby

Relatives said a 25-year-old woman who was shot while apparently trying to shield her two-month-old son was among those killed.

Leta Jamrowski, 19, of El Paso, learned Saturday afternoon that her sister Jordan Anchondo, a mother of three, had been shot to death at Walmart while shopping for back-to-school supplies earlier in the day. Jamrowski spoke to The Associated Press as she paced a waiting room at the University Medical Center of El Paso, where her two-month-old nephew was being treated for broken bones — the result of his mother's fall.

"From the baby's injuries, they said that more than likely my sister was trying to shield him," she said. "When she got shot she was holding him and she fell on him, so that's why he broke some of his bones. So he pretty much lived because she gave her life."

Mexican officials said six Mexican nationals were among the dead.

Authorities were searching for any links between the suspect and the material in the document that was posted online shortly before the shooting, including the writer's expression of concern that an influx of Hispanics into the United States will replace aging white voters. That could potentially turn Texas blue in elections and swing the White House to Democrats.

Edie Hallberg cries while speaking to police outside a Walmart store where a shooting occurred Saturday as she looks for her missing mother Angie Englisbee, who was in the store during the attack. (Andres Leighton/The Associated Press)

"It's beginning to look more solidly that is the case," the police chief said.

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-President Donald 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."

The writer denied he was a white supremacist, but 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 non-white 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.

El Paso County is more than 80 per cent 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. City residents and Democratic presidential candidate Beto O'Rourke, who is from El Paso, led thousands on a protest march past the barrier of barbed wire-topped fencing and towering metal slats.

O'Rourke, a former Texas congressman, 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.

Trump calls shooters 'mentally ill'

Trump ordered flags flown at half-mast in memory of the victims of the two shootings.

The U.S. did not glimpse the president in the immediate aftermath of the weekend shootings. He spent the first hours after the tragedies out of sight at his New Jersey golf course, sending out tweets of support.

Today’s shooting in El Paso, Texas, was not only tragic, it was an act of cowardice. I know that I stand with everyone in this Country to condemn today’s hateful act. There are no reasons or excuses that will ever justify killing innocent people.... —@realDonaldTrump

Trump addressed reporters in Morristown, N.J., Sunday afternoon and denounced the mass shootings, saying "hate has no place in our country."

He said he's been speaking to the attorney general, FBI director and members of Congress and will be making an additional statement Monday.

Trump pointed to a mental illness problem in the U.S., calling the shooters "really, very seriously, mentally ill."

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.