The man charged with murdering three people Nov. 1 at a Thornton Walmart will be transferred to the state hospital for an evaluation of his competency, a judge decided Wednesday.

Scott Ostrem, 47, appeared before Adams County District Judge Ted Tow at a hearing to determine whether to grant him his wish to represent himself.

His attorneys, Emily Fleischmann and Richard Rowe, both public defenders, are fighting his effort to have them taken off the case and argued that he’s not competent.

PREVIOUS STORY: Why Thornton Police took five hours to announce search for Walmart shooting suspect

RELATED: Walmart shooting suspect charged with 6 counts of first-degree murder

Judge Tow briefly cleared the courtroom so Ostrem’s lawyers could share information covered by attorney-client privilege. After reopening the courtroom, the judge said it was “quite clear” that Ostrem “at the very least does not understand what the role of defense counsel is.”

At one point, Ostrem raised his hand and said, “So, if I remove my plea to represent myself, can we proceed?”

Tow said no — that the question of his competence was based on things he’s said to his attorneys, not in his motion.

Tow scheduled a hearing to review the evaluation April 2.

Police arrested Ostrem the morning after Pamela Marques, 52, Carlos Moreno, 66, and Victor Vasquez, 26, were gunned down inside the Walmart at 9901 Grant St.

RELATED: Suspected Walmart shooter walked out of work that morning without a word, boss says

He faces faces 51 separate charges:

- Three counts of first-degree murder alleging the killings occurred “after deliberation.”

- Three counts of first-degree murder alleging the killings were carried out with “extreme indifference.”

- Forty-five counts of attempted first-degree murder.

If convicted of first-degree murder, Ostrem could face life in prison or the death penalty.

Ostrem is accused of walking into a Walmart with a handgun and “nonchalantly” opening fire on a group of people standing near cash registers toward the front of the store.

The motive remains under investigation.

RELATED: Grandfather, man with pregnant fiancée among victims in Walmart shooting

It is not clear whether Marques, Moreno, and Vasquez knew one another or were simply random shoppers visiting the store that Wednesday evening.

Marques was from Denver, while Moreno and Vasquez are from unincorporated Adams County.

Marques, who had a daughter and two granddaughters, was with her husband at the time she was shot.

RELATED: Thornton PD: ‘Mass chaos' inside Walmart after shooting

Moreno was married and had three daughters and two granddaughters. He worked as a handyman at the Auraria Higher Education Center for a little over 18 years.

Vasquez was at the Walmart with his mother and fiancée. He told them to run when he saw the shooter take out his weapon. He also left behind two daughters.

RELATED: What we know about the Thornton Walmart shooting

Contact 9NEWS reporter Kevin Vaughan with tips about this or any story: kevin.vaughan@9news.com or 303-871-1862.