A public schoolboy who attacked two sleeping students and a teacher with hammers at a boarding school has been detained for life with a minimum term of 12 years after being found guilty of attempted murder.

The 16-year-old was wearing just his boxer shorts and used weapons he had collected to prepare for a zombie apocalypse.

The teenager admitted assaulting the two boys and the housemaster at Blundell’s School in Tiverton, Devon, but claimed he was sleepwalking.

Exeter Crown Court heard the youth, who cannot be identified for legal reasons, had armed himself with three claw hammers and waited for the two boys to be asleep before attacking them.

The two pupils were asleep in cabin-style beds in one of the co-ed school’s boarding houses when the defendant climbed up and attacked them shortly before 1am on June 9 last year.

Housemaster Henry Roffe-Silvester, who was asleep in his own quarters, was awoken by noises coming from the boarding house and went to investigate.

When he entered the bedroom where the attack had happened, he saw a silhouetted figure standing in the room, who then turned towards him and repeatedly struck him over the head with a hammer.

Another student heard Mr Roffe-Silvester shouting and swearing as he fled the bedroom and dialled 999 – believing there was an intruder.

The two boys were discovered in their beds a few minutes later.

The trial took place at Exeter Crown Court (PA)

They had suffered skull fractures, as well as injuries to their ribs, spleen, a punctured lung and internal bleeding.

The court heard both are living with the “long-term consequences” of the attack but have no memory of the incident.

Mr Roffe-Silvester suffered six blows to his head.

The defendant maintained he was sleepwalking at the time of the attacks – meaning he would be not guilty of attempted murder by reason of insanity.

But the jury found the defendant guilty of three counts of attempted murder.

During the trial, James Dawes KC, prosecuting, told jurors: “The investigation has uncovered an obsession that the defendant had with one of the boys, an obsession with hammers as weapons, and an obsession with killing and killers and the killing of children.

“He had motive, that he had planned something like this, thought about it in advance, and he was awake.

“He was using his iPad right up to the moment before the attack.

“Mr Roffe-Silvester said he thought the defendant appeared to be ‘on a mission’ and afterwards his face and body relaxed, and he was calm and slumped on his feet, squatting against the wall.”

But one expert told the jury the boy would have been sleepwalking.

Dr Mark Pressman went on to describe the attack on Mr Roffe-Silvester as “a textbook example of sleepwalking violence” and said there were no features in the case inconsistent with sleepwalking.

Relatives of the defendant also told the court about a history of sleepwalking in their family.

Another expert, Dr John O’Reilly, said he did not believe the boy was asleep because a sleepwalker does not initiate violence because it is triggered by noise or touch.

Giving evidence, the boy said he kept two hammers by his bed “for protection” from the “zombie apocalypse”.

The boy added: “I feel very terribly sorry for all three individuals because of what I did to them.

“I feel very sorry for everyone, the families and themselves.”

Passing sentence, Mrs Justice Cutts said the defendant was “dangerous” and only a life sentence could protect the public from further offending, as experts were unable to say how long he would pose a risk.

“It nevertheless remains the case you knew the difference between right and wrong and planned to kill the boys and obtained hammers,” she said.

“You planned your offences and used hammers you had bought as weapons.

“You knew full well if you hit the boys multiple times with the hammers they would die.

“You are an intelligent boy, and I am satisfied you knew the difference between right and wrong.

“I accept that in prison things will be difficult for you.

“In my view there remains a significant risk that you could behave in this way again.

“I consider that you pose a high level of danger to the public because of the nature of your offences.

“A life sentence remains the sentence of last resort. However, in my view, a life sentence is required in your case because it is impossible to say how long you will remain a danger.”

Speaking after the sentencing, Detective Inspector Dave Egan said: “This was an unprovoked attack on two schoolboys as they slept in their beds. The assaults were both brutal and savage and I have no doubt that his intent was to kill.

“Our detectives worked tirelessly to prove that the offender had indeed been fully conscious when committing this horrendous attack, which had been months in the planning.”

The family of one of the teenagers said: “We would like to take this opportunity to thank all those who have assisted in our son’s recovery – from the school community to the paramedics and the doctors and surgeons who gave outstanding care whilst he was in hospital. We are eternally grateful for your interventions.

“The police and the prosecution team have helped us navigate this horrific case with the utmost professionalism and compassion.

“Their thoroughness and attention to detail in the investigation has been truly impressive. We are indebted to everyone involved and would like to convey our sincerest thanks.”

The family of the other boy said: “I am pleased with the way the investigation has been handled by both the police and the prosecution team.

“I am looking forward to my family moving on now that the trial is over, and I hope my son will continue his recovery and have a good future ahead.”