The trial of a Massachusetts teenager accused of murdering his teacher resumed on Wednesday with the teen flanked by extra security a day after he halted the proceedings by refusing to enter the courtroom, claiming he was about to explode.

Philip Chism, 16, agreed to be present in court after initially indicating on Wednesday that he wanted to waive his right to appear.

The day before, Chism, whose attorneys are mounting an insanity defense, had refused to return to the courtroom after a break, saying he was "about to explode" did not "want to hurt anyone."

At one point, Chism lay on the floor of his holding cell and did not respond to questions from the judge.

When Chism returned to the courtroom Wednesday, he was flanked by several court officers. He maintained the same posture he has since the trial began: Sitting still and staring straight ahead.

RELATED: Chism trial on hold after teen melted down, claimed he was 'ready to explode' in court

Chism is being tried as an adult for the murder of Colleen Ritzer, who had been a popular 24-year-old teacher at his high school in Danvers, Massachusetts, a town of 26,000 people about 20 miles (32 km) north of Boston.

Prosecutors allege that on Oct. 22, 2013, Chism followed Ritzer into the bathroom after school, raped her, cut her throat with a box cutter, and transported her body to a wooded area off campus in a recycling barrel.

Defense attorneys acknowledged on Monday that Chism killed Ritzer but said he suffers from a severe "psychotic disorder.”

As one of their first actions when testimony resumed on Wednesday, prosecutors brought the green recycling barrel where police found Ritzer's body into the courtroom to enter as evidence.

The prosecution also presented videos from school surveillance cameras recorded the day Ritzer went missing. They show Ritzer leaving her classroom shortly before 3 p.m., greeting someone and walking upstairs and into a bathroom.

A separate video shows Chism walking out of the classroom, glancing around, pulling the hood of a light blue sweat shirt over his head, and following the same path as Ritzer. Another video shows him putting gloves on before entering the bathroom. About 10 minutes later, Chism can be seen walking quickly down a hallway.