The shooting that killed 20 people at a crowded El Paso shopping area will be handled as a domestic terrorism case, federal authorities have said.

They weighed hate-crime charges against the gunman, who has been identified by the FBI as 21-year-old Patrick Crusius, on Sunday.

If found guilty, he could be sentenced to the death penalty.

Texas Mass Shooting
Patrick Crusius (FBI/AP)

A local prosecutor announced he would bring capital murder charges against Crusius, saying the suspect “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 gunman 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 US attorney.

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

Crusius is from Allen, which is a nearly 10-hour drive from El Paso.

There was no immediate indication he had an attorney.

El Paso police chief Greg Allen said the suspect was cooperative and “forthcoming with information”.

“He basically didn’t hold anything back,” he said.

“Particular questions were asked and he responded in the way that needed to be answered.”

Police 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 technically he was within the realm of the law,” Mr Allen said.

Police say more than two dozen people were wounded in the attack at a shopping area about five miles from the main border checkpoint with Ciudad Juarez, Mexico.

Many of the victims were shot at a Walmart.

“The scene was a horrific one,” Mr Allen said, adding many of the 26 people who were hurt had life-threatening injuries.

Texas Mall Shooting
A relative of a victim of the Walmart mass shooting waits for information from authorities at the reunification centre in El Paso (Andres Leighton/AP)

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,” Ms 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.

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

Officials said three Mexican nationals were among the dead and six more were wounded.

US Mall
(PA Graphics)

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 ageing white voters.

That could potentially turn Texas blue in elections and swing the White House to Democrats.

“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-Trump posts praising the plan to build more border wall, the writer of the online document said his views on race predated Mr 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 US 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.

Texas Mall Shooting
Flowers adorn a makeshift memorial near the scene of the attack (John Locher/AP)

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 grey stone house and later entered the residence.

US President Donald Trump ordered flags flown at half-mast in memory of the victims of the shootings in Texas and Ohio.

He has been out of public but he tweeted about the attacks.

The shooting was the 21st mass killing in the US in 2019 and the fifth public mass shooting.

Before Saturday, 96 people had died in mass killings in 2019 – 26 of them in public.

Mr Trump tweeted to offer prayers for those affected and confirm flags would be flown at half-mast until August 8.

He tweeted: “Today, I authorised the lowering of the flags to half-staff at all Federal Government buildings in honour of the victims of the tragedies in El Paso, Texas, and Dayton, Ohio…..

“The flags at the White House will be lowered today through Thursday, August 8. Melania and I are praying for all those impacted by this unspeakable act of evil!”