The man accused of walking into Oikos University in Oakland three years ago, corralling his former classmates in a room and unleashing a barrage of gunfire that killed seven people and injured three, was declared unfit for trial Thursday — weeks before the legal deadline to restore his competency, an Alameda County Superior Court judge ruled.

After reviewing testimony from several expert witnesses and members of 47-year-old One Goh’s treatment team, Judge Gloria Rhynes ruled the defendant cannot assist his defense because of a mental disorder. Goh was first sent to Napa State Hospital in 2013 after being declared mentally incompetent for trial six months after the April 2, 2012, killings.

Thursday’s decision prompted shock and bewilderment from the victims’ family members, who sat patiently in court throughout weeks of testimony in the case, but were clear in their discontent outside court.

“Justice delayed is justice denied,” said Efanye Chibuko, whose wife, Doris, was killed in the shooting at the small Christian college. “They only considered One Goh — not the families. Everyone can play the game they want to play, and he’s playing the system.”

Another man, whose girlfriend was wounded in the mass shooting, left the courtroom furious over the judge’s decision.

“I’m very frustrated!” said the man, who did not want his name revealed. “He took seven lives and injured three other people. Now we have children without parents. It’s not fair.”

Addressing the victims’ family members, Rhynes said, “I’m very sorry for what brought you to this court,” and added that “justice is not denied, it is simply delayed” when she announced her decision from the bench just after 9 a.m.

“I find the evidence established the defendant unfit to stand trial,” Rhynes said. “I find Mr. Goh has a mental disorder and lacks sufficient present ability to assist his defense. Therefore, the criminal proceedings shall be suspended.”

Goh appeared to listen intently as the judge read her ruling, but showed no emotion as he sat silently in his county-jail-issued red clothes and flip-flops with his hands cuffed at his sides.

Rhynes’ decision came as the three-year deadline to restored Goh’s competency was set to expire at the end of December. Goh will probably be placed under what’s called a Murphy conservatorship where he could be cared for in a state hospital, mental health facility or outpatient program.

The court will reconvene in 60 days to determine if Goh meets the criteria for such as conservatorship, Rhynes said.

“We definitely don’t consider this a victory,” Goh’s attorney, Assistant Public Defender Dave Klaus, said after the announcement. “This is terribly upsetting for the families, and this is not what Mr. Goh wanted. This is an important step in the process and this is no cause for celebration.”

He said Goh could still face justice someday if he is ever deemed competent to stand trial. An annual review of Goh’s competency will be conducted if he qualifies for a Murphy conservatorship, Klaus said.

Goh was indicted on seven counts of murder and three counts of attempted murder in the killings. He was arrested at an Alameda Safeway after taking one of his victim’s cars and speeding from the scene and detailed the killings to Oakland police detectives.

Video of the apparent confession was played earlier this week at his competency hearing.

During the hearing, one psychiatrist at Napa State Hospital, where Goh was sent in 2013 after first being declared incompetent, testified for the prosecution and said he had determined that Goh’s disposition had improved in recent months, and although the defendant was resistant to help his defense, he was not unable to.

Dr. Todd Schirmer — who diagnosed Goh with schizoaffective disorder — said the patient was no longer delusional and his resistance to his defense was probably based on cultural factors and “personality-style.”

Prosecutor Stacie Pettigrew said Goh was remorseful for the killings and “realizes he has committed a horrific crime.”

She argued that Goh was not assisting his defense because he felt guilty for his actions and wished to be put to death.

Klaus called several members of Goh’s treatment team at Napa State Hospital along with several expert witnesses who testified over the past two weeks that Goh remained delusional and little had change with his state of mind since he was first committed to the hospital.

“For the last three years, Mr. Goh has isolated himself in his cell,” Klaus said. “He sits on the edge of his bed and stares into the distance and wishes that he could die.”

Evan Sernoffsky is a San Francisco Chronicle staff writer. E-mail: esernoffsky@sfchronicle.com Twitter: @EvanSernoffsky