A Texas man accused of deliberately targeting people of Mexican heritage in a shooting rampage that killed 22 people at an El Paso Walmart store last year has been indicted on 90 counts of federal hate crimes, according to a court document filed on Thursday.

The federal grand jury indictment charges Patrick Crusius, 21, with 22 counts of hate crimes resulting in death, 23 hate crimes involving an attempt to kill and 45 counts of discharging a firearm in relation to the hate crimes

Crusius was charged in state court last year for the shooting and has pleaded not guilty. He faces the death penalty if convicted.

He is accused of driving 11 hours to El Paso from his hometown of Allen, near Dallas, on Aug. 3 last year and firing at shoppers with an AK-47 rifle inside the Walmart store. He surrendered to officers who confronted him outside.

Crusius confessed while surrendering and told police he was targeting Mexicans, according to an El Paso police affidavit released days after the shooting.

Most of those killed were Latinos.

In a manifesto prosecutors say was posted online by Crusius on 8chan, a now-defunct message board often used by extremists, the accused shooter said his Walmart attack "is a response to the Hispanic invasion of Texas."

The federal indictment quoted the manifesto as also saying that Crusius was "defending my country from cultural and ethnic replacement brought on by the invasion."