SAN ANTONIO — A judge has ruled that a man accused in the shooting death of a San Antonio-area police chief is not guilty by reason of insanity.

Judge Sid Harle determined Monday that evidence showed 28-year-old Joshua Manuel Lopez suffers from a serious mental illness and didn't know his conduct was wrong.

Elmendorf police Chief Michael Pimentel was on patrol in 2014 when he pulled over Lopez on a warrant accusing him of spraying graffiti on a city truck.

Prosecutors say Lopez shot the 64-year-old Pimentel twice.

Lopez will undergo a 30-day evaluation, after which a judge will determine if he should be committed to a state hospital.

If he's no longer considered a threat to the public, Lopez could be released into an outpatient or community treatment program.