German police say another victim in Wednesday's school shooting has died, raising the death toll to 17 -- including the gunman.

The gunman, identified as 17-year-old Tim K., went on a shooting spree Wednesday at his former high school in Winnenden, a suburb located about 20 kilometres northeast of Stuttgart.

According to police, Tim K. entered the school around 9:30 a.m. and started shooting randomly in two classrooms.

"He went into the school with a weapon and carried out a bloodbath," regional police chief Erwin Hetger said Wednesday. "I've never seen anything like this in my life."

Witnesses said some students jumped from windows of the school building when Tim K. began shooting.

In total, he killed nine students, three female teachers, and a passerby near the school before fleeing the scene. An injured girl later died in hospital.

Dave Rising, a reporter with The Associated Press, said the teenager then hijacked a car but let the passengers go free.

As police launched a massive manhunt, Tim K. drove about 40 kilometres to a nearby town.

When eventually confronted, he killed two bystanders before police killed him in a shootout.

Rising, speaking to CTV Newsnet from Berlin, said two officers were seriously injured in the exchange.

According to police, Tim K. was dressed in a black combat uniform. They have not revealed what type of gun he used.

The shooting is the worst to happen in Germany since 2002, when 19-year-old Robert Steinhaeuser shot and killed 12 teachers, a secretary, two students and a police officer at a high school in Erfurt.

Steinhaeuser, who had been expelled from the school, then turned the gun on himself. Steinhaeuser was a gun club member and was licensed to own weapons.

Following the attack, Germany raised the age for owning recreational firearms from 18 to 21.

A spokesperson for Chancellor Angela Merkel said she was "deeply shocked and incensed about the appalling killing spree."

With files from The Associated Press