One suspect was taken into custody while authorities were studying an extremist manifesto purportedly written by the gunman.
Footage shot on camera phones appeared to show multiple bodies lying on the ground in the store's parking lot while El Paso authorities made a desperate appeal for blood donations.
Other footage showed terrified shoppers running out of the store as gunfire echoed.
"Twenty innocent people from El Paso have lost their lives," Texas Governor Greg Abbott told a press conference.
"We as a state unite in support of these victims and their family members... We pray that God can be with those who have been harmed in any way and bind up their wounds."
Police chief Greg Allen confirmed that in addition to the 20 confirmed fatalities, there were 26 wounded.
Various news reports said the ages of victims being treated at hospitals ranged from two to 82 years.
Police said that Walmart was "at capacity" at the time of the shooting, with 1,000-3,000 customers inside.
After officials initially said three people had been detained, police confirmed that a 21-year-old from Allen, Texas, was the only person in custody.
"Right now we have a manifesto from this individual that indicates to some degree, it has a nexus to potential hate crime," Allen said. US media named the suspect as 21-year-old Patrick Crusius, who is white.
The "manifesto" purportedly written by Crusius that was circulated online includes passages railing against the "Hispanic invasion" of Texas and the author makes clear that he expected to be killed during his attack.
Witnesses said the gunman appeared to be shooting at random when he opened fire around 10:30 am.
One woman, who gave her name as Vanessa, said she had just pulled into the Walmart parking lot when the shooting began.
"You could hear the pops, one right after another and at that point as I was turning, I saw a lady, seemed she was coming out of Walmart, headed to her car. She had her groceries in her cart and I saw her just fall," she told Fox News.
The witness said the gunman wore black t-shirt, combat trousers and was wearing ear muffs.
"He was just shooting randomly. It wasn't to any particular person. It was any that would cross paths." Another shopper described how he managed to avoid being hit by hiding along with his mother between two vending machines just outside the store.
"That's where the individual tried to shoot at me, which he missed cause I kind of ducked down," Robert Curado told the El Paso Times.
Video captured by a witness in the parking lot in the immediate aftermath of the shooting showed three people lying motionless on the ground.
One had fallen next to a truck, while two were on the sidewalk outside the store entrance. " Ambulance! Help!" people cried as they rushed to the victims.
"How you doing, brother, how you doing," one man was heard saying on the recording.
A still captured from CCTV showed the gunman carrying what appeared to be an AK-47.
President Donald Trump, who is spending the weekend at his golf club in New Jersey, condemned the "terrible" shooting after being briefed by Attorney General Bill Barr and Abbott.
It has been a particularly bad week for gun violence in the United States. Two people died and a police officer was wounded Tuesday at a Walmart in Mississippi.
Last Sunday a 19-year-old gunman opened fire at a food festival in northern California, killing three, including two children.
Beto O'Rourke, a former US congressman for El Paso who is now running for president, cut off his campaigning in the wake of the shooting.
"I'm incredibly saddened and it's very hard to think about this. But I tell you El Paso is the strongest place in the world, this community is going to come together," he told supporters.
Elizabeth Warren, a senator who is among the frontrunners for the Democratic party's presidential nomination, said "far too many communities have suffered through tragedies like this already.
"We must act now to end our country's gun violence epidemic," she said. Another presidential hopeful Cory Booker said the US had "to end this national nightmare" and "find the moral courage to take action to end this carnage.
Business Standard has always strived hard to provide up-to-date information and commentary on developments that are of interest to you and have wider political and economic implications for the country and the world. Your encouragement and constant feedback on how to improve our offering have only made our resolve and commitment to these ideals stronger. Even during these difficult times arising out of Covid-19, we continue to remain committed to keeping you informed and updated with credible news, authoritative views and incisive commentary on topical issues of relevance.
We, however, have a request.
As we battle the economic impact of the pandemic, we need your support even more, so that we can continue to offer you more quality content. Our subscription model has seen an encouraging response from many of you, who have subscribed to our online content. More subscription to our online content can only help us achieve the goals of offering you even better and more relevant content. We believe in free, fair and credible journalism. Your support through more subscriptions can help us practise the journalism to which we are committed.
Support quality journalism and subscribe to Business Standard.