DISCOVERY BAY (BCN) — The man accused of killing 9-year-old Jordon Almgren in 2015 while he slept in his Discovery Bay home did so to feel what it was like to take a human life, a Contra Costa County prosecutor said Monday.

William Shultz, now 20, snuck into the boy’s room at about 3:45 a.m. on April 26, 2015, after shutting off power to the house at the circuit breaker box in the garage, Deputy District Attorney Simon O’Connell said today during his opening statement in Shultz’s murder trial.

Shultz, who pleaded not guilty in 2015, “crept upstairs veiled in darkness” and plunged a 5-inch hunting knife with a partially serrated blade into Almgren’s body five times, O’Connell said.

Shultz stabbed the third-grader so hard and so deeply in the chest that the knife left a hilt mark on his body.

He slit Almgren’s throat and stabbed him in the neck, severing the boy’s spinal column, O’Connell said.

Shultz also cut his own arm badly enough to leave blood evidence at the scene, according to O’Connell.

“I put my hand over his mouth so he wouldn’t make a sound,” O’Connell said Shultz told investigators. “I needed to see what it felt like to kill somebody.”

He fled the home in a pickup truck he stole from the Almgren family, according to O’Connell.

Shultz, who has pleaded not guilty to murder and burglary charges, was at the Almgren home that night because he had been kicked out of his own house after an argument with his mother.

Earlier that day, he had told her that she “might as well just shoot me” because of what he felt was the imminent start of an apocalyptic world war, O’Connell said.

Kate Shultz was so worried about her son that she called the Contra Costa County Sheriff’s Office, which dispatched a deputy to the home.

William Shultz, who O’Connell described as charming and persuasive, agreed to a voluntary mental health evaluation at Contra Costa Regional Medical Center in Martinez. It was there that he was told his theory of a looming global war was a delusion, according to O’Connell.

He was sent home in a taxi that same day, mocked the mental health providers with whom he had talked and argued with his mother until she kicked him out of the house, O’Connell said.

He grabbed a duffel bag filled with some books, a first aid kit, rubber surgical gloves, two maps of the United States, a compass, a survival blanket, a flint and the knife, and walked the short distance to the Almgren house, where his best friend lived with his four siblings.

In addition to the Almgrens, four other teen boys were spending the night at the home in anticipation of a paintball excursion the next morning.

“You didn’t have to worry about anything because the house was filled with so much laughter,” said Jordon’s mother Melissa, according to O’Connell.

The Almgrens have said they had no idea about Shultz’s possible mental health issues.

The other boys went to bed at about 2 a.m. but Shultz stayed awake preparing to kill somebody. He picked Jordon Almgren because he was “the littlest and weakest,” O’Connell said.

Deputy Public Defender Cynthia Scofield did not dispute that Shultz killed Almgren, but told the jurors that the stabbing was not premeditated.

She said that to understand the case, it is necessary to understand that Shultz’s home life had been deteriorating for years.

His parents had split and leveled accusations of substance abuse and mental illness at each other, Scofield said.

Allegations of parental neglect also surfaced and Shultz’s sister, who was transitioning to male, had died by suicide, Scofield said.

He was doing so poorly in school that he was kicked off of the water polo team. He hitchhiked to Southern California with no money, no cellphone and without wearing shoes, she said.

“Things are falling apart and his head is spinning,” Scofield said.

The day before the killing, he was released from the hospital without any medication to control his delusional thoughts, Scofield said.

“Lady’s and gentlemen, that is what seals the deal in Billy’s chaotic mind,” she told the jurors.

The trial is expected to continue Tuesday morning in Contra Costa County Superior Court in Martinez.