SALEM — Philip D. Chism, the teenager whose trial for the rape and murder of his Danvers High School math teacher was repeatedly interrupted by questions about his ability to understand court actions, was competent throughout the legal proceedings, a judge ruled Tuesday.
Superior Court Judge David A. Lowy had declared Chism, 16, competent to stand trial in November, but he did not discuss the reasons for his findings until Tuesday when defense lawyers and prosecutors met to discuss sentencing.
Chism “had the capacity to understand what was going on during the trial cognitively,’’ Lowy said in Essex Superior Court. He added that Chism had “sufficient, present ability to help with his attorney with a degree of rational understanding.’’
A jury convicted Chism last week of murdering, raping, and robbing Colleen Ritzer on Oct. 22, 2013. In reaching their unanimous verdict, jurors rejected defense arguments that Chism was legally insane when he attacked Ritzer, 24, in a girls bathroom and then moved her body into nearby woods using a recycling barrel.
Chism’s sentencing is set for Jan. 29. He did not attend Tuesday’s hearing.
Jury selection, which began Oct. 7, was interrupted for about three weeks after Chism told a court clinician that he feared being shot in the courtroom and had devised a suicide plan. After a hearing, Lowy ordered Chism to undergo a competency evaluation.
In remarks Tuesday, however, Lowy said that Chism was competent the day he disclosed his fears about being shot and on another day in November when Chism refused to return to the courtroom, allegedly declaring that he was “about to explode.’’
“The court finds that the defendant’s conduct . . . were not issues that raised concerns about [competency] but rather the defendant not wishing to participate in the proceedings,’’ Lowy said.
Chism’s sentencing is expected to last much of the day Jan. 29. Eight to 10 people are expected to deliver victim impact statements, said Essex Assistant District Attorney Kate MacDougall.
Defense attorney Denise Regan requested that no one outside Ritzer’s immediate family be permitted to wear pink during the hearing. During Chism’s trial, some family members and prosecution witnesses wore the color, which was Ritzer’s favorite.
“The courtroom is a solemn place,’’ Regan said. “It’s no place for displays of any particular sentiment or emotion and it’s important that there be an appearance of fair and even justice. And for that reason I would urge the court to limit the display of the color pink.’’
MacDougall strenuously objected, calling the request “petty and cruel.’’
“I cannot imagine a more respectful, toned-down, appropriate way of honoring Colleen in a place where there is little comfort for her family, where there is little chance for her to be honored,’’ MacDougall said.
Lowy, who will sentence Chism, said he probably would not notice the colors people wear to the hearing, but acknowledged that displays of pink by people outside Ritzer’s family could create the appearance of unfairness.
“It seems to me for perception purposes that members of the district attorney’s office and police officers during sentencing should not wear pink,’’ he said.
Lowy ruled that government officials connected to the case cannot wear pink items, but ruled that Ritzer’s family and anyone else who chooses to do so can wear the color.
Sentencing for Chism is likely to be scrutinized given recent court rulings that have put new limits on punishments for juvenile offenders.
Under separate decisions by the US Supreme Court and Massachusetts Supreme Judicial Court, Chism cannot be sentenced to life without the possibility for parole for murder because he was a juvenile when he attacked Ritzer.
Essex District Attorney Jonathan Blodgett’s office has said Chism faces a life sentence for the murder, with the possibility of parole after 15 to 25 years.
For the armed robbery and aggravated rape convictions, both felonies that carry maximum penalties of life in prison, prosecutors believe Chism is subject to a life term with a chance for parole after 15 years.
Lowy has the authority to order Chism to serve sentences for each of the crimes concurrently or consecutively, according to Blodgett’s office.
Laura Crimaldi can be reached at laura.crimaldi@globe.com.