The public prosecutors identified the alleged conspirators only as Michael F, 14, and his two friends Artur D and David B, all pupils at the Metten Hauptschule in the small town of Deggendorf in rural Bavaria.
At least 15 of the boys' classmates knew of the intended bloodbath, yet it was only days before the plan was due to be put into action, that a girl in the class tipped off police. Only then did another pupil say that Michael F had shot at her a few weeks earlier. The police arrested the trio at school.
The boys' lawyers insisted the plot was nothing but fantasy. The judicial authorities in Bavaria are considering how culpable the classmates were through not reporting the intended crime. This is an important issue in Germany where looking the other way - a throwback to the Nazi past and persecution of the Jews - can be an offence.
The details of the plot revealed by the judicial investigation authorities this week are sobering. It is alleged that the three had been meticulously planning the murder since October, drawing up a list of weapons - including hand-granades and mines - how to acquire them, and how and where they would kill their victims.
Michael F had taken his father's legally-registered revolver and 30 to 40 bullets. The three planned to first shoot class teacher Hildegard Niedermayer in the shoulder and feet, so that she would die slowly and painfully. "They wanted to watch her as she died," said public prosecutor Guenther Albert.
Next, they intended to kill school principal Irmgard Jobornitzky and use the remaining bullets on schoolmates. They even thought of killing themselves after a shoot-out with police.
"These youths wanted to become famous as mass murderers," said Mr Albert.
An investigation is already under way in Dresden against eight pupils in one of the most prestigious grammar schools in Saxony who may have been aware of plans of the murder of history teacher Sigrun L, stabbed 22 times in early November by a 15-year-old pupil, because she had given him poor marks.
A teenage gunman opened fire at a Dutch vocational school, wounding a teacher and four students on Tuesday.
The 17-year-old suspect is alleged to have fired 10 shots from a handgun because he was annoyed about the relationship between his 15-year-old sister and another student.
On Monday a 13-year-old student in Tulsa, Oklahoma, in the United States, allegedly pulled a gun from his backpack and fired 15 rounds, wounding four students.