NEW YORK (CBSNewYork) — The driver who killed a tourist and hurt over 20 others in a Times Square sidewalk rampage earlier this year will use mental illness as a defense.

As WCBS 880’s Alex Silverman reported, Richard Rojas had a court hearing Monday – though Rojas himself was not present.

Rojas’ attorney told the judge he will use his psychiatric defense. The 27-year-old has a history of mental illness and told police he had smoked marijuana laced with PCP before he turned his car the wrong way up Seventh Avenue and barreled along the sidewalk for three and a half blocks.

He said he wanted to “kill them all” and police should have shot him to stop him, prosecutors have alleged.

Police say Rojas steered his sport-utility vehicle onto a sidewalk at 42nd Street and Seventh Avenue and hit the gas. The May 18 rampage killed 18-year-old Alyssa Elsman, a tourist from Michigan, and injured 22 other people.

Rojas is charged with murder under two different legal theories. One count alleges that he intended to kill Elsman, and another that he killed her by acting with depraved indifference to human life.

Defense attorney Enrico DeMarco is challenging a search of Rojas’ apartment. He said medical records were seized.

The prosecutor in the case told the judge some papers were contained with Rojas’ medical records, and investigators closed them as they realized what they were.