US authorities are investigating a "hate-filled" online post they believe was published by the gunman who carried out a deadly attack in El Paso, Texas.
At least 20 people were killed and 26 injured in the shooting at a Walmart and nearby Cielo Vista shopping centre, in what turned out to be the first of two deadly gun attacks in the US over the weekend.
Sergeant Robert Gomez said the gunman, named by law enforcement officials in US media as 21-year-old Patrick Crusius, used a rifle in the attack.
FBI agents are looking into a post they are "reasonably confident" was published by the suspect shortly before the shooting.
The four-page document, which was posted online, appears to describe the gunman's motives for the attack, and expresses extreme anti-immigrant and racist views, particularly against the Hispanic population.
It also mentions support of the shootings in Christchurch, New Zealand, in March, in which 51 people died after a gunman opened fire at two local mosques.
Speaking at a press conference, US representative Veronica Escobar said: "Not speaking about this particular incident, which is still under investigation, but the manifesto narrative is fuelled by hate, and it's fuelled by racism and bigotry and division."
More from Texas
El Paso police chief Greg Allen said that in examining the document, there was "potential nexus to a hate crime".
He described the scene of the attack as "horrific", adding that many of the wounded had life-threatening injuries.
Texas governor Greg Abbott confirmed 20 people had died in the attack, saying it was "one of the deadliest days" in the state's history. It is the eighth worst mass shooting in modern US history.
"This is disgusting, intolerable, it's not Texan, and we are going to aggressively prosecute it both as capital of murder but also as a hate crime – which is exactly what it appears to be without having seen all the evidence yet," he said.
At the time of the shooting, the supermarket was packed with up to 3,000 people, including many buying back-to-school supplies.
Officers said most of the victims had been shot at Walmart, adding that the mall had also been "secured".
A man in his 20s was detained near the El Paso mall. Police said they did not fire a shot.
During the attack, shoppers fled for their lives, including Kianna Long, who was at the Walmart with her husband when they heard gunfire.
"People were panicking and running, saying that there was a shooter," she said. "They were running close to the floor, people were dropping on the floor."
The couple ran through a stock room at the back of the store before sheltering with other customers in a steel container.
Mexico's president Andres Manuel Lopez Obrador said three of those who died were from his country.
Doctors said 23 people had been taken to hospitals.
The University Medical Centre of El Paso treated 12 patients, including two who were transferred to the El Paso Children's Hospital. Elsewhere, the Del Sol Medical Centre was treating 11 people.
One of the patients at the University Medical Centre of El Paso later died.
Multiple security forces were deployed to the scene of the attack, including police and state troopers as well as Homeland Security and border agents.