More than a year after police said his “indiscriminate” gunfire wounded five people and caused chaos inside a crowded suburban Walmart, a Philadelphia man will head to trial this week on attempted-murder and related charges.

In court Tuesday, the attorney for Keenan Jones made clear what his defense will be: that the 31-year-old is not guilty by reason of insanity.

Jones was arrested after the August 2018 incident, which drew national headlines. Police said Jones opened fire after he got into an argument with another customer while standing in the checkout line at the store in Cheltenham Township.

Jones’ attorney, Vanessa L. Bellino, in discussing his plea, told Common Pleas Court Judge Risa Vetri Ferman that Jones suffers from post-traumatic stress disorder and has ever since witnessing the murder of his father, James Hayes, during a neighborhood dispute in 2004.

At his arraignment on the day after the shooting, Jones told a local judge that he “needed hospital help.” He complained that he was under significant stress when the shooting took place, hadn’t slept in five days, and had eaten food that made him feel strange.

Prosecutors, led by Assistant District Attorney Tonya Lupinacci, seemed to cast doubt on the defense’s assertions Tuesday. Opening statements in the trial were tentatively set for Wednesday, after the court spent most of Tuesday afternoon seating the jury.

Investigators have said the violent outburst at the Walmart began when Jones grabbed a 9mm handgun from his sister’s waistband and fired once at the man with whom he had been arguing. It was unclear what the dispute was over.

Jones’ sister is registered to carry the firearm and has not been charged in the shooting. Jones is not permitted to carry a gun because he has felony convictions for witness intimidation and firearm offenses.

In the affidavit of probable cause for Jones’ arrest in the Walmart shooting, investigators described the scene as “pandemonium.” They said he ran through the store, firing random shots as customers and store employees ran for safety.

Surveillance footage showed that Jones “specifically targeted a second victim” for unspecified reasons as Jones tried to flee the store. Jones shot that victim, a woman, four times, according to the affidavit. One of the shots severed an artery.

Jones and his sister then fled in a Pontiac Grand Prix, stopping to discard the gun nearby, police said. They were arrested after crashing the sedan into a parked Philadelphia police car, there on an unrelated matter.

The trial is expected to last through Friday.