El Paso, Texas • A gunman wielding an assault-style rifle killed at least 20 people and injured 26 more on Saturday at a busy Walmart and shopping mall not far from the Mexican border, authorities said, in the latest mass shooting to shatter a community and shake the country.

The attack, just before 10 a.m. on a scorching Texas summer day, sent shoppers racing for cover in a chaotic but all-too-familiar scene of carnage that prompted a massive police and medical response.

One official said the specific number of people killed and injured was subject to change, noting that some of the victims were in critical condition. It was not known how many of the injured were shot or were hurt trying to escape the scene.

Two law enforcement officials familiar with the inquiry, who spoke on the condition of anonymity to discuss an ongoing investigation, identified the suspect as Patrick Crusius, a 21-year-old man from a suburb near Dallas. He was taken into custody without incident.

As the shooting quickly became fodder on the presidential campaign trail - Democratic candidate Beto O’Rourke of Texas canceled events in Las Vegas to return home — federal and local authorities were scrambling to identify a motive.

One avenue of inquiry is a manifesto that includes remarks attacking immigrants and is sympathetic to a man charged with killing 51 people earlier this year at Christchurch in New Zealand, according to the two officials. Authorities believe the gunman posted the anti-immigrant diatribe, but are still gathering evidence to prove it, according to law enforcement officials.

In a statement issued Saturday evening, Attorney General William Barr that "those who commit such atrocities should be held accountable swiftly and to the fullest extent the law allows." If investigators determine that Crusius did write the posting, he could be charged with violations of federal hate crimes laws.

The shooting in El Paso was the deadliest American mass shooting since November 2017, when a gunman killed 26 people in a church in Sutherland Springs, Texas. It comes just days after a gunman opened fire at a garlic festival in California, killing three and wounding 12 others. One of those killed was a 6-year-old boy.

The scene of the most recent carnage — a Walmart — is likely to become important symbolically in the debate over gun control. Walmart is one of the largest gun retailers in the world and has been under pressure to curtail sales.

Last year, the store announced it was changing the minimum age required to buy a firearm or ammunition at Walmart from 18 to 21 “in light of recent events,” according to a statement released by the company. The decision came two weeks after the shooting at Marjory Stoneman Douglas High School in Parkland, Fla., that left 17 people dead.

The suspect in Saturday’s shooting sounds very much like past shooters — quiet, antisocial and a bit “strange,” according to people who grew up with him in Plano, Tex.

Crusius attended school with his twin sister Emily Crucius. The school collectively thought of Patrick Crusius as “the strange one” of the sibling duo, according to two people who attended with them — both of whom requested their names not be published.

It is not clear how Crusius got from the Dallas area to El Paso, a roughly nine-hour drive.

City police said the shooting began about 10 a.m. local time and quickly warned that people should avoid the area of Hawkins and Gateway East boulevards. The department said in another tweet at 10:09 a.m. that the shooter remained active.

The shooting apparently began outside the Walmart.

Vanessa Saenz, a 37-year-old El Paso resident, was turning into the Walmart parking lot, with her mother and son, to buy the family’s weekly groceries when she heard a few pops that sounded like fireworks.

She looked over and saw a man who seemed to be “dancing” in the air — and then she noticed a woman sprinting.

Saenz realized that the man had been shot and that these were no fireworks.

"My mom yelled, 'Just go! Speed and just go!' but of course there were people trying to dodge the bullets and running through the parking lot," Saenz said in an interview with The Post.

She also caught a glimpse of the shooter, who she said was wearing dark cargo pants, a black T-shirt, and some sort of earmuffs. He was around 5-foot-10-inches tall, thin and carrying a rifle, she said.

He was just "shooting randomly," Saenz said, and then he walked into the store and she lost sight of him.

Inside the Walmart, shoppers and employees raced to exit the store or even hide in shelves. Witnesses said Good Samaritans used their own cars to transport victims to hospitals.