A man charged with fatally shooting an Indianapolis police officer when she responded to a domestic violence call in 2020 will be allowed to seek insanity as a defense as he tries to avoid the death penalty.

A Marion Superior Court judge made the ruling Friday and will assign two psychiatrists to evaluate Elliahs Dorsey's mental health.

SUSPECT IN INDIANAPOLIS POLICEWOMAN'S KILLING SEEKS INSANITY DEFENSE TO AVOID DEATH PENALTY

Attorneys for Dorsey filed a motion with the court in May saying a report prepared by a doctor states Dorsey was suffering from a mental illness when he shot Indianapolis Officer Breann Leath to death.

Elliahs Dorsey

Elliahs Dorsey, who stands accused of killing Indianapolis Police Officer Breann Leath, will be permitted to seek insanity as a defense. (Indianapolis Police Department via AP, File)

Leath and three other officers were responding to a domestic violence call involving Dorsey when she was shot twice in the head through the door of an Indianapolis apartment, police said.

MAN WHO SHOT TENNESSEE OFFICER DIES IN HOSPITAL AFTER CONFRONTATION, OFFICER RECOVERING

Dorsey faces one count each of murder and criminal confinement, and four counts of attempted murder, one of which stems from his alleged shooting of a woman he had confined inside the apartment.

A judge has ruled that prosecutors can seek the death penalty.

CLICK HERE TO GET THE FOX NEWS APP

His trial had been set to start in September but is now scheduled to begin Feb. 12, 2024.