EL PASO, Texas (CBSDFW.COM/AP) — The man accused of carrying out last weekend’s deadly mass shooting at an El Paso Walmart confessed to officers while he was surrendering that he had been targeting Mexicans.

Patrick Crusius, 21, emerged with his hands up from a vehicle that was stopped at an intersection shortly after last Saturday’s attack and told officers, “I’m the shooter,” Detective Adrian Garcia said in an arrest warrant affidavit.

Crusius later waived his Miranda Rights and agreed to speak with detectives, telling them that he had driven to El Paso from his home in the Dallas suburb of Allen — which is a more than a 10-hour drive from El Paso — and that he was targeting Mexicans in the attack.

Twenty-two people were killed and about two dozen others were wounded in the attack. Many of the dead had Latino last names and eight of them were Mexican nationals.

Authorities believe Crusius posted a racist manifesto that railed against an influx of Hispanics into the U.S. shortly before the attack.

Crusius has been charged with capital murder and is being held without bond. Federal prosecutors have said they are also considering hate-crime charges.

However, his family’s attorneys said the family never heard Crusius articulate the views contained in the online screed.

Hours after the attack in El Paso, a gunman killed nine people and wounded many others in Dayton, Ohio.

El Paso sits on the border with Mexico and has a large Latino population.

(© Copyright 2019 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)