The suspected gunman accused of killing 22 people in a shooting rampage at Walmart in El Paso, Texas last weekend confessed while surrendering and told police he was targeting “Mexicans,” according to an El Paso police affidavit released on Friday .

The suspect, Patrick Crusius, 21, came out of his vehicle, stopped at an intersection, “and stated out loud ‘I’m the shooter’”, Detective Adrian Garcia said in the affidavit on Sunday, a day after the shooting.

Crusius has been charged with capital murder and is being held without bond.

The affidavit said Crusius waived his right to remain silent after he was taken into custody and told detectives he entered the Walmart with an AK47 and multiple magazines.

“The defendant stated his target (was) Mexicans,” the affidavit said.

Crusius is accused of shooting and killing 22 people and wounding two dozen more on Saturday, shortly after a manifesto appeared online explaining his motivation and decrying a “Hispanic invasion” of the United States.