The gunman fired at shoppers who were doing their Saturday shopping at the Cielo Vista Mall in El Paso on August 3, said Mayor Dee Margo.
At least 22 people have been injured, with 11 victims being rushed to the University Medical Center of El Paso. Officials have not yet confirmed the number of fatalities but media puts it at at least 20.
Videos shared online shows shoppers hiding under tables as the sound of multiple gunshots can be heard in the background.
Chilling CCTV screenshots show the gunman aiming his weapon inside the shopping centre, while wearing headphones. Other videos show terrified shoppers being rushed out of the mall with their hands in the air.
The suspected gunman is in custody and has been identified as Patrick Crusius, 21, of Allen, Texas, according to CNN.
It is believed investigators are analysing an online post published just days before the shooting, which could reveal a motive for the attack.
Officials don’t believe any other suspects are outstanding right now, despite the mayor saying earlier that there had been three people in custody, Metro UK reports.
Sylvia Saucedo, who filmed the video while hiding underneath the table, recounted the ordeal on Facebook in Spanish.
She wrote: “What a horrible experience! Shooting in Walmart in Cielo Vista!
“My mum and I were underneath the table filming this because 911 didn’t answer! I imagine that all of us that were there were calling at the same time. We’re so grateful to God for having looked after us.”
Trump reacted to the mass shooting in Twitter, writing: “Terrible shootings in ElPaso, Texas. Reports are very bad, many killed. Working with State and Local authorities, and Law Enforcement. Spoke to Governor to pledge total support of Federal Government. God be with you all!”