SAN JOSE — As top local law enforcement officials packed the courtroom, three Santa Clara County correctional officers in handcuffs and leg chains shuffled into court where they were arraigned on murder charges in the vicious lethal beating of mentally ill inmate Michael Tyree.

But Tuesday also brought a new wrinkle to the controversial case, as prosecutors added an assault charge involving another inmate, in effect accusing the officers of a pattern of violence.

Investigators with the Santa Clara County Sheriff’s office contend that just minutes before the fatal encounter with Tyree, officers Jereh Lubrin, 28, Matthew Farris and Rafael Rodriguez, both 27, hit inmate Juan Villa in the head and twisted his arms before continuing on their rounds.

Prosecutors allege the three brutally beat Tyree, then left his cell only to return about an hour later and report the inmate was injured. After Tyree died, the three claimed they used force on him after he refused to take his medication, sources told this newspaper, but the investigator’s report said he had taken his medication earlier, during the evening “pill call.”

There were no eyewitnesses to the beating, though inmates reported seeing the guards enter the cells of both men and heard them both screaming. Legal analyst Steven Clark, a former Santa Clara County prosecutor, said that the District Attorney’s Office is alleging the officers’ culpability based on the fact that all other inmates were locked up, Tyree was in a single-person cell, and no other people or jail staff were present in the sixth-floor jail wing where Tyree was held.

“Even if some level of force could have been justified at some point, leaving him there to die is implied malice for second-degree murder,” Clark said. “Not reporting it and to silently walk out of the room, that is what the D.A. is relying on.”

The officers’ failure to report the force or seek medical help undercuts whatever justification they might offer in court for the beating, Clark said, and the second assault allegation “suggests an ongoing pattern of behavior.”

District Attorney Jeff Rosen has assigned one of the most acclaimed homicide trial attorneys in the office, Matthew Braker, to the case. In 2010, Rosen named Braker as Prosecutor of the Year for winning four first-degree murder convictions that year.

“The jail is … there for protection, of those outside of it, and those housed in it. Without protection, there is no accountability, there is no rehabilitation, and in the end, there is no human dignity,” Rosen said after the arraignment. “Those who were supposed to protect Michael Tyree did not. Instead, they killed him.”

In a jailhouse interview Saturday, Rodriguez said he was not involved in any attack on Tyree and that neither he nor his co-defendants laid a hand on him.

Lubrin briefly met with a reporter from this newspaper while in custody but did not comment on the case. Farris, the son of former longtime Santa Clara County prosecutor Thomas Farris, also has not publicly commented on the charges against him, but his attorney, William Rapoport, defended his client.

“I’m suggesting that he did not cause the death of this individual,” Rapoport said in response to reporters’ questions.

Shackled at the wrists, waist and ankles, and clad in maroon jumpsuits reserved for high-security inmates, the officers made a brief appearance before Judge Allison Danner. None of them said anything beyond a quiet “yes” as they agreed to a perfunctory waiver of their right to a speedy trial.

Authorities on every side of the issue was represented in force at the hearing. Rosen was accompanied by his executive prosecution staff. Sheriff Laurie Smith, who oversees the jails, sat in the back of the courtroom gallery with several of her top-line commanders. Several correctional officers showed up. And some public defenders, there for other cases on the docket, wore black ribbons in memory of Tyree, whom the Public Defender’s Office represented in previous cases.

The three officers did not enter pleas and are set to return to court Sept. 18 for a bail hearing; until then they will remain in custody at Santa Rita Jail in Alameda County. Farris’ attorney, William Rapoport, said his client and the co-defendants are not flight risks and should not be in custody.

District Attorney Jeff Rosen said after the hearing that his office will contest any release of the defendants.

“We oppose bail,” Rosen said. “When someone commits murder, there is no bail.”

The fact remains, however, that there were no eyewitnesses to what happened inside Tyree’s cell beyond the three officers, a fact that Rosen acknowledged could keep the rationale behind the alleged attack forever shrouded in mystery.

“Motive is not an element in the crimes we have charged,” Rosen said. “We may never know what the specific motive was in this case.”

Tyree’s unresponsive body was found shortly after midnight Aug. 27, covered in vomit and feces, in a single-person cell at the Main Jail on West Hedding Street. Other inmates also told this newspaper they heard Tyree, who was mentally ill, crying out in pain, saying he was sorry and asking the officers to stop.

Tyree was behind bars for about two weeks stemming from violating probation on a minor drug charge. He was set to be transferred to a treatment center, but until a bed was available, a jail cell was deemed safer for the homeless Tyree than releasing him to the streets.

In a statement of facts filed in court Tuesday morning, an investigator from the sheriff’s office states that on Aug. 26, Tyree put his medication in his pocket at the 7:30 p.m. pill call rather than taking it. Lubrin confronted him and told him to go back to the nurse’s window. Tyree called the nurse a liar and rapist. Then he “ate” the pills, according to the statement.

About 10:38 p.m., two of the officers, Lubrin and Farris, began searching cells for any extra clothing the inmates may have hidden. At 10:48 p.m., Rodriguez joined them.

The court document described the following: They confronted inmate Juan Villa about a dispute he had with another inmate, hit him in the head and twisted his arms, leaving visible marks on them.

When they got to cell 39 where Tyree was housed, Lubrin and Farris entered the cell, with Rodriguez just inside the door, which was open. Inmate Tyree was reportedly heard saying, “Do I have to get up?” Then Farris ordered him to get up.

Tyree was then heard screaming, “I’m sorry. I’m sorry. Stop.” The screaming could be heard throughout the pod and was accompanied by the sounds of thumping, wall banging and what sounded like blows to a person’s body, according to the investigative report. At some point, Rodriguez closed the door almost all the way.

The officers reportedly injured Tyree above his eye, near his chin and on his cheek. There was also a bruise above his left ear, and injuries to his upper arms, back, legs and both hips. The most significant injury was to his lower left back, causing severe damage to his spleen and liver.

The internal bleeding from the latter wounds caused him to die within minutes to no more than one hour, the investigator stated.

The guards then left the cell and did not call for medical assistance to Tyree. After midnight, Lubrin returned to the pod to do a welfare check. At 12:12 a.m. he radioed there was a “man down.” Tyree was pronounced dead Aug. 27.

Smith and the medical examiner have not specified publicly whether Tyree was struck with a weapon or just with hands and/or feet. But a source familiar with the investigation said Tuesday that the medical examiner found that Tyree’s cuts, bruises and damaged liver and spleen are consistent with being punched, kicked and thrown.