This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

ADAMS COUNTY, Colo. — The man accused of shooting and killing three people at a Thornton Walmart in November has pleaded guilty to three counts of first-degree murder.

In striking this deal with prosecutors, Scott Ostrem will avoid the death penalty.

Pamela Marques, 52, Carlos Moreno, 66, and Victor Vasquez, 26, were killed in the shooting.

Many victims’ loved ones filled the courthouse while Ostrem gave his guilty plea Wednesday.

In addition to the three murder charges, Ostrem pleaded guilty to attempted first-degree murder with extreme indifference and one count of crime of violence, the 17th Judicial District Attorney’s Office said.

In all, Ostrem faced six first-degree murder charges and 30 attempted murder charges.

“[District Attorney Dave] Young said he was in the process of making the decision of whether to seek the death penalty and consulting with families when defense attorneys said Ostrem was willing to plead guilty to three counts of first-degree murder with a sentence of life in prison without parole,” the district attorney’s office said in a statement.

“Young said he consulted with the families of the three murder victims as well as many of the other victims in making the decision to accept the plea.”

Young said Ostrem has not yet revealed a motive for the shooting.

“The families would like to know as well as everyone in the public would like to know why this happened, but there’s only one person that knows that. And Mr. Ostrem will have an opportunity to make a statement at his sentencing,” Young said.

Young said he hoped the plea deal would bring some closure to victims’ families.

“I can’t sit here and tell you that they’re happy because they’re not,” he said. “I don’t know that they’ll ever be happy with any resolution in this case. But I think once they get to a sentencing phase, they might be able to let the court know what this crime has done to them.”

In August, Ostrem’s legal team entered a not-guilty plea. At the time, a judge denied Ostrem’s attorneys’ effort to postpone the trial to file a mental illness or insanity plea.

Ostrem’s trial had been scheduled for January.

In a hearing this summer, prosecutors said Ostrem went to a shooting range, Colorado Clays Shooting Park, the afternoon of the shooting and fired more than two dozen shots at a target.

They also said Ostrem was wearing the same clothes seen on the shooter in surveillance video from the Walmart.

During the hearing, Ostrem’s defense attorneys did not question the video, but instead statements from some of the witnesses whose descriptions of the shooter varied.

Some told police the shooter had red hair, was Hispanic, had a mustache or wore glasses. In April, Ostrem was determined mentally competent to stand trial.

Sentencing is scheduled for Oct. 19.