BRIGHTON, Colo. — The man who gunned down three people in a suburban Denver Walmart last year was sentenced Friday to life in prison without parole. But more than 11 months after the crime, his motive remains a mystery.

Scott Ostrem, 48, received three consecutive life terms plus 48 years as part of a deal he made with prosecutors to avoid a potential death sentence for first-degree murder. He did not speak at the hearing and was motionless when he was sentenced.

Ostrem walked into a Walmart in Thornton the evening of Nov. 1, 2017, opened fire and left without saying anything, witnesses said.

Investigators said he fired seven times in about 20 seconds — killing Victor Vasquez, Pamela Marques and Carlos Moreno.

"There seems to be no motive, rationale for Mr. Ostrem's actions," said Judge Mark D. Warner, who heard emotional testimony from relatives of all three victims who died.

The only explanation the judge could offer was that Ostrem has a "black and malignant heart, fatally bent on spreading fear, misery and death in our community."

Vasquez, 26, of Denver, had two young daughters and a third child on the way, according to a GoFundMe page set up to collect donations. Marques, 52, was a grandmother, also from Denver. Moreno, 66, was a grandfather and maintenance worker from Thornton.

"If he (Ostrem) would have walked up to Carlos that day in the store and told Carlos, 'I'm having problems. I need help,' Carlos would have helped him, as Carlos would have helped anybody," Alice Acosta, Moreno's sister-in-law, said after the hearing.

Nothing has emerged publicly to suggest a reason for the attack.

The victims were Hispanic and Ostrem is white, but prosecutors did not charge him with a hate crime. Police said they found nothing to suggest the shootings were related to terrorism. After Ostrem underwent a mental health evaluation, a judge ruled he was competent to stand trial.

"I think we had an individual who is a psychopath," Adams County District Attorney Dave Young said after the hearing. "I think he wanted to kill people. He practiced it. He went to the shooting range that afternoon, and he fulfilled what he wanted to do."

Ostrem's stepsister, Michelle Willoughby of Cocoa Beach, Florida, told The Denver Post that Ostrem was tormented by voices in his head after taking LSD at a party in 1988.

Willoughby said she did not know what might have triggered the shootings. After the drug episode, she said, Ostrem transformed from an outgoing, sociable and athletic person to a recluse haunted by voices saying the devil was after him.

"He is not cold-blooded," she said. "He hears these voices. Honestly, in my heart, I believe there is only so much a person can take."

Ostrem was a sheet-metal worker with an unremarkable past. He had minor run-ins with police, including a 1999 charge of resisting arrest that was dismissed. He filed for bankruptcy in 2015, listing $47,000 in income and more than $85,000 in debts.

He left conflicting impressions at work and at his apartment building.

For three years, Ostrem worked quietly and without trouble fabricating metal flashing for roofs, said David Heidt of B&M Roofing. But at midmorning on the day of the shootings, he left his work station without explanation.

Neighbors described him as a hostile loner who cursed at them and often carried a shotgun in and out of his third-floor apartment.

"He didn't seem to have anybody," said Teresa Muniz, who also lived at the complex. "Being angry all the time. That's what he seemed like, always angry."