Michał Chodyra/iStock(KALAMAZOO, Mich.) — Jason Dalton, a former Michigan Uber driver who was set to stand trial for a shooting spree that killed six, said Monday he was pleading guilty to all charges, against his attorney’s advice.

Six were killed and two others were injured in a string of shootings that took place in several locations in the Kalamazoo area on Feb. 20, 2016.

Dalton was an Uber driver at the time of the crimes and allegedly carried out the shootings in between picking up riders.

Dalton, who made the surprising declaration to plead guilty as the court was preparing for jury voir dire, said his decision was made to avoid putting his family through a trial.

Dalton, whose charges included six counts of premeditated murder, said he has been wanting this for a long time.

Kalamazoo County prosecutor Jeff Getting said it’s unusual to make a guilty plea to first-degree murder because the consequence is mandatory life in prison.

As a result of the plea, Dalton will serve a life sentence without the possibility of parole.

Getting called this the prosecution’s best outcome.

“We’re very happy that we’re able to reach this resolution,” Getting told reporters Monday. “Doing this is what’s best for the people of this community, it’s what’s best for our victims.”

Dalton will be sentenced on Feb. 5, 2019. Victims and victims’ families will have a chance to address the court at that time, Getting said.

Copyright © 2019, ABC Radio. All rights reserved.