A teenager in black combat gear went on a rampage at his old school in Germany yesterday, slaying at least 15 people before turning his gun on himself during a shoot out with police.

The 17-year-old, named as Tim Kretschmer, entered the secondary school in Winnenden near Stuttgart at 9:30 am (0830 GMT), killing nine pupils aged between 14 and 15 and three teachers in different classrooms with a handgun.

He wandered into several classrooms at the school he left last year, indiscriminately spraying bullets at teachers and students.

"He was constantly reloading his weapon," local police chief Konrad Gelden told reporters.

"He just opened the door, pulled out his gun and started shooting," one pupil said on German television. "One person saw someone shot in the head."

"My brother was in the classroom in which it happened," said another. "He was sitting next to his girlfriend and she was shot."

The German school shooting came just hours after a gunman went on the rampage in the southern US state of Alabama, killing 10 people before also turning the gun on himself.

Mr Kretschmer went into classroom 10d three times, the Bild daily said on its website, hissing on the third visit: "Aren't you all dead yet?"

A teacher threw herself in front of a female pupil - and was shot by the gunman, Bild said.

Police were alerted to the shootings within three minutes and despatched two vehicles to the scene where they discovered the bodies of the pupils and three teachers - one of whom had only been working at the school for four weeks.

The 17-year-old then fled the Albertville-Realschule and went to a nearby psychiatric clinic where he shot dead a member of staff and stole a Volkswagen Sharan car. He then sped 40 kilometres to the town of Wendlingen.

By this time a massive manhunt was underway, with hundreds of armed police commandos and snipers in black body armour on his trail, assisted by helicopters and dogs.

"The whole time police were on his trail," Mr Gelden said.

Cornered in the car park of a shopping centre, a shootout between the teenager and the police ensued, in which two passers-by were killed.

It seems Mr Kretschmer turned his gun on himself after being wounded in the shootout, police said.

"According to the latest police information, he was hit in an exchange of fire (with police) and then used his weapon on himself," police spokesman Fritz Mehl said.

Two policemen were seriously injured in the fire-fight but they were in a stable condition in hospital. Eight people were injured altogether.

German Chancellor Angela Merkel expressed her condolences to the families and friends of those killed in what she called a "horrendous crime."

"Like all people in Germany, I find what happened today in the Albertville-Realschule in Winnenden incomprehensible," Ms Merkel said.

"It is a day of mourning for the whole of Germany. Our thoughts go out to the familes, the friends. We are thinking of you and we are praying for you," Ms Merkel added.

The killings drew international condemnation as well with European Commission president Jose Manuel Barroso saying he was "appalled and saddened by the senseless violence that cut short so many lives."

The Bild daily said on its website that commandos had stormed the home of the teenager's parents, where 16 weapons were legally held - one of which the teenager used in his rampage, police said. He also took 50 bullets.

Speaking to reporters, the interior minister of Baden-Wuerttemberg state said there was nothing in the gunman's background to indicate that he held a grudge against the school.

"The gunman wanted to destroy an entire school," Heribert Rech said. "He was completely unremarkable, there was nothing in his background to suggest this could have happened."

The picturesque town of Winnenden, around 25 kilometres northeast of Stuttgart in Baden-Wuerttemberg, has around 27,000 inhabitants.

The school, which has 600 pupils, was part of a complex of several other schools with a total of 1,700 students aged from six to 19.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.