The Texan accused of slaughtering 22 people in the El Paso Walmart massacre is due in court Thursday afternoon for his arraignment.

Patrick Crusius, 21, was indicted last month for capital murder and will face the death penalty if he is convicted, El Paso District Attorney Jaime Esparza said.

The Department of Justice has called the Aug. 3 shooting an act of domestic terrorism and federal authorities say they are also investigating possible hate crimes charges.

Crusius is accused of driving 11 hours from his hometown of Allen, near Dallas, to El Paso and using an AK-47 rifle in the slaughter that left another 26 injured.

After fleeing, he turned himself in less than an hour after the bloodbath, telling cops, “I’m the shooter,” according to his arrest warrant.

Police say he confessed to the mass shooting and said he was targeting Mexicans. A four-page screed he allegedly posted on 8chan just minutes before the attack said it was “a response to the Hispanic invasion of Texas.”

Thursday’s arraignment, set for 2 p.m. local time, is being held in the county’s largest courtroom, which seats 100, because authorities expect such large crowds.

Security will also be heightened before the hearing in front of state District Judge Sam Medrano, the sheriff’s department said.

The first judge assigned the case recused himself, because he knew one of the people killed in the attack.

The lead prosecutor also says his sister was in the Walmart during the attack and that the gunman walked right by her.

The Texas killings were followed just 13 hours later by a mass shooting in Dayton, Ohio, where gunman Connor Betts killed nine people and wounded 27 others before he was shot dead by police.

With Post wires