Exeter Crown Court did not release the defendant's identity due to his age. The student allegedly waited for his friends to fall asleep before attacking them.

Apophis will pass very close to Earth! Apophis will pass very close to Earth!

Paramedics called to the school described the incident as "a scene from a horror movie", while a paramedic said the scene he encountered was "the most terrifying scene he had seen in 20 years".

The boy, who was found to have used a hammer during the attack, "said he was tasked with preparing for the zombie apocalypse".

Paramedics said both boys suffered skull fractures as well as rib, spleen, lung puncture and internal bleeding injuries. 

The boy, who later said he was sleepwalking and thought he was dreaming, was referred to court.