The man accused of fatally stabbing a New Castle County police officer two years ago has pleaded guilty but mentally ill to first degree murder and 15 additional felony charges.

Attorneys for 34-year-old David Salasky put fourth a plea deal earlier this week and state prosecutors accepted the agreement today before Judge William Carpenter.  Jury selection in Salasky's murder case was scheduled to begin on Monday.

Salasky is accused of fatally stabbing Lt. Joseph Szczerba on Sept 16, 2011. Szczerba, an 18-year veteran of the department confronted Salasky while responding to a car break-in call. The two engaged in a violent struggle before Salasky stabbed Szczerba in the neck with a fixed-blade knife.

Salasky had a previous criminal history and was high on drugs known as "bath salts" during the attack. The Delaware General Assembly passed a law banning the sale of "bath salts" after that fact became known.

He had initially pleaded not guilty to the charges. If the case went to trial, he could have faced the death penalty.

“We’re very happy with the outcome and we think it’s the right result,” said Kevin O’Connell, public defender representing Salasky.

The agreement means Salasky won't face the death penalty. The maximum penalty is life in prison without the possibility of parole along with a 153-year maximum in prison for another series charges, which include, possession of a deadly weapon, assault, burglary and resisting arrest.

“The plea in this case recognizes two things, first, that the defendant was criminally responsible for the murder of Lt. Joseph Szczerba and second that he has a chronic history of substantial mental illness," said Deputy Attorney General Steven Wood.

New Castle County Police Chief Elmer Setting said the agreement means quicker closure rather than waiting out a potentially lengthy trial.

“This is justice without 10 years of uncertainty in the appellate courts, without struggling over, if Mr. Salasky is or is not mentally ill, said Setting. “The uncertainty of a decade of waiting for justice isn’t the answer.”

Szczerba’s widow Kathy made brief remarks following the agreement.

“Joe gave his life protecting his community, all I ask is that the decision regarding this case be in compliance with protecting the officers who continue to do the work Joe gave his life for,” she said.

Before sentencing, Judge Carpenter will have to determine under Delaware law if in fact that Salasky is mentally ill, added Wood.

If the court disagrees with the agreement, the Salasky would have the option of withdrawing his guilty plea.