Kretschmer wrote: "I have had enough, I have had enough of this crummy life... Always the same. People are laughing at me, no one  recognises my potential. I mean it seriously, Bernd."

Mark Seddon, Al Jazeera's correspondent in Winnenden, said that Kretschmer had received psychiatric treatment but that this had been discontinued.

Day of mourning

Germany has been in a state of mourning over the attacks, with flags flown at half mast.

Angela Merkel, the German chancellor, who is due to visit Winnenden on Thursday,  called the killings an incomprehensible crime that had left her nation in mourning.

In video


Germany in shock after deadly shooting spree

Kretschmer opened fire at the school on Wednesday, killing nine students and three teachers before commandeering a car and fleeing the scene.

The 17-year-old attacker later took his own life after a shootout with police in the town of Wendlingen, near Stuttgart.

People packed churches for special services on Wednesday night, while dozens attended a vigil outside the school.

Seddon said: "Counsellors from all over the country are flying in to spend time with children and parents, to try and understand what on earth happened.

"What made a young student go on a rampage killing fellow pupils, killing teachers -and what will people learn to try and ensure this doesn't happen again?"

"There are many grieving parents. It's a very, very sad scene.

"He [Kretschmer] was a loner... he had an interest in the occult and his father was a member of a gun club. They had 16 guns in the house.

"He left no message and so far there appears to be no motive".

'No apparent motive'

A video taken on a mobile phone showed Kretschmer at a car dealership where he killed three people, then himself.

There was no immediate indication of motive, but the victims were mostly female: eight of nine students killed were girls, and all three teachers were women.

Three men were killed later as the suspect fled.

Merkel said it was a 'day of mourning for the whole of Germany' [EPA]
Erwin Hetger, a regional police chief, said: "He went into the school with a weapon and carried out a bloodbath. I've never seen anything like this in my life."

Konrad Gelden, the local police chief, said the teenager was "constantly reloading his weapon".

Merkel said: "It is unimaginable that in just seconds, pupils and teachers were killed, it is an appalling crime. This is a day of mourning for the whole of Germany."

The attack is Germany's worst school shooting since 2002, when 16 people were killed at a high school in Erfurt in eastern Germany by a 19-year-old former student, who then turned the gun on himself.

In November 2006, a former student at a vocational school in Lower Saxony in northwestern Germany went a shooting spree, injuring 37 people before killing himself.